5628
29.6. contextlib — Utilities for with-statement contexts
This module provides utilities for common tasks involving the with statement.
python  contextlib 
2 days ago
Context Managers and the “with” Statement in Python – dbader.org
The “with” statement in Python is regarded as an obscure feature by some. But when you peek behind the scenes of the underlying Context Manager protocol you’ll see there’s little “magic” involved.
python  bestpractices  contextlib  contextmanager 
2 days ago
brannondorsey/wifi-cracking: Crack WPA/WPA2 Wi-Fi Routers with Airodump-ng and Aircrack-ng/Hashcat 🖧
This is a brief walk-through tutorial that illustrates how to crack Wi-Fi networks that are secured using weak passwords. It is not exhaustive, but it should be enough information for you to test your own network's security or break into one nearby. The attack outlined below is entirely passive (listening only, nothing is broadcast from your computer) and it is impossible to detect provided that you don't actually use the password that you crack. An optional active deauthentication attack can be used to speed up the reconnaissance process and is described at the end of this document.
wifi  hacking  security  deauth  github_repo 
2 days ago
Orwell’s “1984” and Trump’s America | The New Yorker
And so, rereading Orwell, one is reminded of what Orwell got right about this kind of brute authoritarianism—and that was essentially that it rests on lies told so often, and so repeatedly, that fighting the lie becomes not simply more dangerous but more exhausting than repeating it. Orwell saw, to his credit, that the act of falsifying reality is only secondarily a way of changing perceptions. It is, above all, a way of asserting power.


Watch: there will be a “commission” consisting of experts borrowed from Breitbart; it will hold no hearings, or hold absurdly closed ones; or hold ones with testimony from frequent callers to “The Alex Jones Show”—and this clownish commission will then baldly conclude that there is, indeed, widespread evidence of voter fraud. And Trump will reassert the lie and point to his commission’s findings as his evidence.
trump  authoritarianism 
3 days ago
Bikepacking Made Easy: An Illustrated How-To
Interested in bikepacking? This illustrated guide gives a helpful (and humorous) look at how to load up your ride for a weekend away on the road or the trail.
biking  bikepacking  humor 
5 days ago
Rolling Restarts | Elasticsearch: The Definitive Guide [master] | Elastic
There will come a time when you need to perform a rolling restart of your cluster—keeping the cluster online and operational, but taking nodes offline one at a time.

The common reason is either an Elasticsearch version upgrade, or some kind of maintenance on the server itself (such as an OS update, or hardware). Whatever the case, there is a particular method to perform a rolling restart.

By nature, Elasticsearch wants your data to be fully replicated and evenly balanced. If you shut down a single node for maintenance, the cluster will immediately recognize the loss of a node and begin rebalancing. This can be irritating if you know the node maintenance is short term, since the rebalancing of very large shards can take some time (think of trying to replicate 1TB—even on fast networks this is nontrivial).

What we want to do is tell Elasticsearch to hold off on rebalancing, because we have more knowledge about the state of the cluster due to external factors.
elasticsearch  sysadmin 
8 days ago
posener/complete: bash completion written in go + bash completion for go command
Writing bash completion scripts is a hard work. This package provides an easy way to create bash completion scripts for any command, and also an easy way to install/uninstall the completion of the command.

github_repo  tool  completion  bash  zsh  golang  lang:go 
9 days ago
mikeash.com: Friday Q&A 2017-07-14: Swift.Codable
Swift 4's Codable API looks great and ought to simplify a lot of common code. For typical JSON tasks, it's sufficient to declare conformance to Codable in your model types and let the compiler do the rest. When needed, you can implement parts of the protocol yourself in order to handle things differently, and you can implement it all if needed.

The companion Encoder and Decoder protocols are more complex, but justifiably so. Supporting a custom format by implementing your own Encoder and Decoder takes some work, but is mostly a matter of filling in a lot of similar blanks.
swiftlang  codegen  serialization  json  Codable 
10 days ago
Why you should, actually, rewrite it in Rust – Unhandled expression
What I’m advocating for is much simpler: surgically replace weaker parts but keep most of the project intact.
security  rust_lang  safety 
15 days ago
tj/mmake: Modern Make
Mmake is a small program which wraps make to provide additional functionality, such as user-friendly help output, remote includes, and eventually more. It otherwise acts as a pass-through to standard make.
make  tool  github_repo  lang:golang 
21 days ago
Does Ann Arbor need a stronger relationship with Detroit?
wouldn't it be neat if we had, say, a functional regional transit system?

<sigh>
detroit  annarbor 
26 days ago
supermoof on Twitter: "when you start a new programming job you have to walk right up to the biggest function in the yard and refactor it in front of everyone"
when you start a new programming job you have to walk right up to the biggest function in the yard and refactor it in front of everyone
is:tweet  programming  refactoring  humor 
4 weeks ago
DRYing up duplicate code into helper functions # Chris Dzombak
During a code review, it’s not uncommon for a reviewer to comment, “it looks like there’s some duplication here; can you please DRY this code up?”

We often assume it’s clear what this comment means. But it’s worth examining what the reviewer is asking for, and why it’s important.
dry  refactoring  bestpractices 
6 weeks ago
Forget It Paul. It’s Trumptown.
Many on the right have long desired the America that’s coming. The “tenthers” and extreme federalists have yearned for a country of 50 little nation states, acting in concert only when they must. They went to the Supreme Court to defend the principle that states should be able to condemn their own citizens to a life without healthcare. Perhaps Donald Trump, who has exposed this country’s chasms and warts like no other president before, has finally given them their way.
america  trump 
6 weeks ago
“How to Write a Method” on Vimeo
Of course, any Java programmer knows how to write a method. But is that really the case? Many programmers find they code more by habit — habits picked up from frameworks, IDE defaults and a random selection of blogs — than by reason. This talk tries to dissect some common habits with reason to reveal, well, how to write a method.

We all know how to write a method. We all know how to write a class. We all understand how to name a field. We all understand the practices we use, their deep rationale and their implications. We are perfectly rational, reasoned and unbiased about how we code and the practices we employ. Then again... perhaps not.

It turns out that we pick up habits and practices without being aware of them, retrospectively creating justification and rationale for what we do, whether it is naming conventions, indentation, control flow, use of language features, commenting, class layout, etc. All too often many things that have been considered good practice are discouraged because of IDE defaults or memes and habits emerging from vocal developers.

This session tries to take a more rational approach that allows you to evaluate and improve how you write methods. There is a good chance you won't agree with everything as many common Java habits are questioned and subjected to merciless reasoning.
java  is:video  style  naming  bestpractices  testing  design 
7 weeks ago
Using @autoclosure when designing Swift APIs — Swift by Sundell
Good examples of using Swift's @autoclosure attribute to build well-designed APIs.
@autoclosure  swiftlang 
8 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:tweet 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 refactoring 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:



description:


tags: