Express Yourself Swift Style
A reminder that Swift's "expressible by X literal" protocols are sometimes a nice touch when implementing a data structure.
literals  swiftlang  ExpressibleBy  protocols 
10 days ago
yandex/gixy: Nginx configuration static analyzer
Gixy is a tool to analyze Nginx configuration. The main goal of Gixy is to prevent security misconfiguration and automate flaw detection.
github_repo  security  nginx  tool 
10 days ago
schollz/howmanypeoplearearound: Count the number of people around you by monitoring wifi signals
howmanypeoplearearound calculates the number of people in the vicinity using the approximate number of smartphones as a proxy (since ~70% of people have smartphones nowadays). A cellphone is determined to be in proximity to the computer based on sniffing WiFi probe requests. Possible uses of howmanypeoplearearound include: monitoring foot traffic in your house with Raspberry Pis, seeing if your roommates are home, etc.
github_repo  wifi  privacy 
10 days ago
The World Is Getting Hacked. Why Don’t We Do More to Stop It? - NYTimes.com
The path to a global outbreak on Friday of a ransom-demanding computer software (“ransomware”) that crippled hospitals in Britain — forcing the rerouting of ambulances, delays in surgeries and the shutdown of diagnostic equipment — started, as it often does, with a defect in software, a bug. This is perhaps the first salvo of a global crisis that has been brewing for decades. Fixing this is possible, but it will be expensive and require a complete overhaul of how technology companies, governments and institutions operate and handle software. The alternative should be unthinkable.
security  malware  ransomware  siliconvalley  society  incentives  microsoft 
14 days ago
JohnSundell/Require: Require optional values to be non-nil, or crash gracefully
Sometimes you have optional values in your code that are not really optional, and will cause your application to enter an undefined state if nil. Require makes it easy to avoid such states, by causing a crash with rich debug information, to enable you to much easier hunt down & fix the bug.

Neat little µlibrary that helps concisely handle a common-but-not-too-common Swift use case.
swiftlang  lang:swift  option_type  github_repo 
21 days ago
Picking the right way of failing in Swift – John Sundell – Medium
nice discussion of how/when to use Swift's various error checking & handling mechanisms.
swiftlang  error_handling  assertions  preconditions  exceptions  option_type 
21 days ago
Nirma/UIFontComplete: Make working with UIFont faster and less error-prone.
No more muddling around searching for names of UIFont types and no more surprises at runtime if a font name was mistyped. This library is simply one extension to UIFont and one Font enum with a case for each system font on iOS.
lang:swift  enum  UIFont  fonts  ios  github_repo 
21 days ago
Yoga | YOGA
Yoga is an open-source, cross-platform layout library that implements Flexbox.
layout  flexbox  facebook  ios 
25 days ago
Automatic audio post production web service for podcasts, broadcasters, radio shows, movies, screencasts and more
podcasting  tool 
25 days ago
How to set up git to use the GPG Suite
setting up GPG to work nicely with various git tooling.
git  gpg  security  tutorial  sysadmin  github_gist 
27 days ago
Hate Speech as Free Speech: How Does That Work, Exactly? | Radical Washtenaw
In short, don’t fall for the argument that freedom of speech is sacrosanct and should be placed above any objections one might have to a speaker’s ideas and politics. The very definition of free speech in US society is determined by where one stands in relation to those who run this country. Not only is the concept of freedom of speech certain to be manipulated by those who have no intention of defending your free speech, it is an argument based on false assumptions. If Anne Coulter, Milo Y, or some other fascist wannabe wants to exercise their free speech, let them stand out in the middle of Berkeley’s Sproul Plaza or some other public space like the rest of us and make their speech. Then, and only then, is it genuinely free.
free_speech  america 
28 days ago
Swift range containment operator – Szy – Medium
Key idea: we should have an overload of ~= that takes (element, range), not just (range, element).

This lets syntax like `if x ~= 0...10 { … }` work nicely.
swiftlang  patternmatching 
28 days ago
Window installation · Bryan Irace
When attempting to overlay something on top of your entire view hierarchy – common examples include a notification banner or a heads-up display – it’s helpful to move up a level beyond regular views or even view controllers, and start thinking in the context of windows. While one could reach for UIApplication.shared.keyWindow, or employ some private API to find e.g. the window that’s currently hosting the status bar or an alert dialog, a far simpler and cleaner approach is to simply create a new window of your own. This is far from a new technique, but I only recently learned how easy it actually is in practice.
ios  uikit  UIWindow  bestpractices 
4 weeks ago
Training Tip: Two takes on trim - AOPA
All that was before she learned that you can’t trim until you have succeeded in establishing the aircraft in the condition you want to trim it for—which required patience. She also came to realize that certain disturbances, such as light turbulence, don’t require you to react to every minor pitch upset with pitch and trim inputs. You can let the airplane fly because it will restabilize.

Another time-tested tidbit about trim technique was discovering that once the airplane was pitch-trimmed, it would maintain its trimmed airspeed after power was reduced for the descent to the destination airport unless the pilot chose to change airspeed with a pitch adjustment, or reconfigure with flaps.
4 weeks ago
Can Facebook Fix Its Own Worst Bug? - NYTimes.com
Facebook’s entire project, when it comes to news, rests on the assumption that people’s individual preferences ultimately coincide with the public good, and that if it doesn’t appear that way at first, you’re not delving deeply enough into the data. By contrast, decades of social-science research shows that most of us simply prefer stuff that feels true to our worldview even if it isn’t true at all and that the mining of all those preference signals is likely to lead us deeper into bubbles rather than out of them.
facebook  echo-chambers  news  society 
4 weeks ago
Training Tip: Crosswinds, crosswinds, crosswinds - AOPA
There’s a practice exercise for that. It requires only your instructor seated next to you, a nice long runway, and enough crosswind to be educational.

Fly your final approach, but instead of rounding out, flaring, and landing, level off above the runway at ground-effect height by adding a touch of power. Fly along the runway at final approach speed, keeping the airplane above the center stripe with a bit of bank into the crosswind and a touch of opposite rudder to keep the nose from swinging in the direction of the lowered wing. Be assertive and make sure to use enough rudder to keep the airplane pointed straight down the runway. That is what makes the method click.

Note that if you don’t apply sufficient aileron deflection, the airplane will immediately begin to drift downwind; if you detect drift, maneuver smoothly back to the centerline and readjust your control pressures. Perform a go-around with a generous margin of runway remaining.

Practice as much as wind conditions and traffic permit.
flying  crosswind  landings 
5 weeks ago
sleevi/CT Best Practices (April 2017)
Similar to my advice regarding OCSP Stapling for servers/server developers, based on questions I've received about "CT best practices," I wanted to write something similar for those writing server software. That is, this isn't targeted at server operators, but for those writing software like Apache, nginx, Caddy, etc.

At the most basic level, the deployment of Certificate Transparency to date has largely tried to focus the burden on CAs, rather than on server developers. If the CA is doing everything right, the server developer and the server operator shouldn't need to bother with CT, and all is good. However, with proposals liked Expect-CT, it may be that server operators want to opt-in to CT, even without their CA's support, and so need work from the server operator.
certificates  certificate_transparency  server  bestpractices  sysadmin  tls  pki  github_gist 
5 weeks ago
On Twitter the other day, I was lamenting the state of OCSP stapling support on Linux servers, and got asked by several people to write-up what I think the requirements are for OCSP stapling support.
tls  OCSP  Must-Staple  bestpractices  server  sysadmin  github_gist 
5 weeks ago
Market-Rate Housing Isn’t a Bad Word, and We Won’t Solve the Housing Crisis Without It
While the new apartment or condo project down the street is expensive, so is the 75-year-old house or apartment you’re trying to buy or rent. It’s *all* expensive, and that’s not because it’s “luxury.”

It’s because it’s scarce.
housing  economics  urban_development 
5 weeks ago
Washington Monthly | Terminal Sickness
But now we find ourselves at a moment when nearly all the promises of the airline deregulators have clearly proved false. If you’re a member of the creative class who rarely does business in the nation’s industrial heartland or visits relatives there, you might not notice the magnitude of economic disruption being caused by lost airline service and skyrocketing fares. But if you are in the business of making and trading stuff beyond derivatives and concepts, you probably have to go to places like Cincinnati, Pittsburgh, Memphis, St. Louis, or Minneapolis, and you know firsthand how hard it has become to do business these days in such major heartland cities, which are increasingly cut off from each other and from the global economy.
airlines  business  deregulation  capitalism  economy 
6 weeks ago
Mobile Code Sharing Strategies: a Comparative Analysis at Khan Academy - Google Docs
Reimplementing the same thing multiple times is error-prone, time-consuming, and demoralizing. But the cure might be worse than the disease. Let’s take a look. No recommendations here yet: let’s discuss first.

The Android app is split into two primary modules: “core,” which is isolated from Android and implements things like persistence, networking, and business logic; and “app,” which knows about Android and implements the UI and app-level concerns. This split is a useful one for thinking about code sharing strategies: it might be useful to share only one side, or to use different strategies for each.
code_sharing  c++  swiftlang  interop  java  mobile  software  programming  ReactNative  Xamarin 
6 weeks ago
frograin/FluidValidator: General purpose validation system for objects, nested objects, enumerables written in Swift
FluidValidator is intended to encapsulate validation logic. The API was designed with FluentValidation (https://github.com/JeremySkinner/FluentValidation) and Rails Validation as reference. Currently offers validation of simple objects, complex objects (object graph), enumerables. Localized error messages. You can easly override base behaviors and/or build your own reusable validation rules.
lang:swift  validation  github_repo 
7 weeks ago
a2geeks discussion on Ann Arbor's I-net municipal fiber replacement project
This project is to replace the institutional fiber network (I-net) that Comcast built for government units in the city as part of the franchise agreement in the early naughts. State law no longer allows negotiation of franchise agreements on the local level like that, and the original agreement did not specify that the city would own the fiber, so when te agreement is up in 2018, Comcast will be taking the fiber back. The city is leading an intergovernmental project to reconnect the sites served by the iNet to a new fiber network that would be owned by the city. this is a point-to-point network that does not directly connect to the Internet although most of the institutional partners (such as AADL) use iNet fiber to deliver high-speed net access to satellite locations via downtown locations that have fiber links to ISPs, mostly merit.

So, there is no residential or commercial component of this fiber project. It’s networking between government buildings. I’m not sure of the state of the law here in Michigan, but in many states it is no longer legal for municipalities to build networks for residential and commercial use due to telecom lobbying at the state level.

The small edit I’d make to Eli’s excellent summary is that iNet access has been extended to support municipal contracts, e.g. Republic Parking for networking to the parking structures, and Ann Arbor SPARK (if I recall correctly; I’m not 100% sure if the SPARK incubator traceroute goes through this network, but I think it does).
annarbor  a2council  fiber  internet 
7 weeks ago
Send Safari Tab List to OmniFocus
This AppleScript saves a list of all the open tabs in your (frontmost) Safari window to a new item in OmniFocus – Perfect for keeping track of webpages to return to later instead of keeping a billion tabs open all the time! By default, the item is given a name with the Date and Time and all of the links/URLs are collected in the item's note section.
safari  applescript  omnifocus  tool 
7 weeks ago
Objective-See: BlockBlock
Malware installs itself persistently, to ensure it's automatically re-executed at reboot. BlockBlock continually monitors common persistence locations and displays an alert whenever a persistent component is added to the OS.
osx  security  tool 
7 weeks ago
Buscador Investigative Operating System
Buscador is a Linux Virtual Machine that is pre-configured for online investigators.
OSINT  journalism  tool  security 
7 weeks ago
Upgrade your SSH keys! · blog.g3rt.nl
Tl;dr: Generate your new key with ssh-keygen -o -a 100 -t ed25519, specify a strong passphrase and read further if you need a smooth transition.
sysadmin  ssh  bestpractices  security 
7 weeks ago
Avoiding primitive obsession in Swift – CompileSwift – Medium
Domain modelling is essential to making code that is easy for new and experienced developers alike to be able to understand. By making your code more explanatory, you make it easier for developers to understand, and easier to refactor. By ensuring you prevent misuse of code, you make it safer to refactor and reuse code. Type systems are powerful tools to help improve your code, and can also have benefits for understanding the business rules you need to write. But in Swift, the types don’t have to be a burden while testing, by implementing the ExpressibleLiteral protocols.
swiftlang  types  bestpractices  modeling  data  refactoring 
8 weeks ago
The James Mickens Collection – Daniel Compton
James Mickens works at Microsoft Research. Amongst his more serious work, he has written some hilarious papers for Usenix, and given some funny talks. I’ve collected a selection of my favourite quotes here, but you should really read and watch them all from start to finish.
humor  programming  technology 
9 weeks ago
Swift Releases Have Themes – Ole Begemann
About a week ago, Swift Core Team member Ben Cohen wrote a thoughtful message on swift-evolution, answering a question about the chances of purely additive proposals to be accepted for Swift 4.

Ben explains the rationale the Core Team uses to decide which proposals should make it into the next version of the language. The gist of it is that each Swift release should focus on a small number of themes and that proposals contributing to these themes will be given priority.
swiftlang  swift-evolution 
9 weeks ago
« earlier      
373proj a2council accessibility algorithms america android animation annarbor api apple applewatch appstore art associated_types async autolayout aviation bash bestpractices business c c++ charting ci clang cli clips clojure cocoa cocoa_touch cocoapods coffee color complexity concurrency coreanimation coredata corefoundation couchdb cryptography cs css culture cycling d3 data debugging design designpatterns detroit development diy dmx512 documentation elecdiy election2016 electronics embedded encryption engineering enum error_handling extensions facebook filetype:pdf finance flying foia font friends functionalprogramming game gcd generics gif git github github_gist github_repo golang graphics health html html5 http humor icons inspiration internet interop ios ios10 ios7 ios8 ios9 is:video java javascript journalism jquery json keyboard keychain kvo lang:swift layout life lighting linux management markdown matlab media:document memorymanagement michigan mocking music mvvm networking newspapers nginx notifications nsa nsurlsession nyc nytimes nytnow objective-c oop option_type osx parser performance photog photography php politics privacy productivity programming protocol_extensions protocols python quote radio reactivecocoa reactiveprogramming reactjs reactnative reference resources rest ruby rust_lang rx rxjava safety search security shop simplicity society software software_architecture solid srp ssl startups stm8 strings swiftlang sysadmin testing tls tool tools travel turbojet tutorial twitter type_members types ui uicollectionview uiimage uikit uitableview uiviewcontroller umich unicode unix ux via:andrewsardone via:androidweekly via:cdzombak via:iosdevweekly via:mattb visualization watchkit water weather web_dev windows wordpress work xcode xctest

Copy this bookmark: