Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pythonista script to show the UI Debugging overlay (private API) described in this blog post: | |
# http://ryanipete.com/blog/ios/swift/objective-c/uidebugginginformationoverlay/ | |
from objc_util import ObjCClass, on_main_thread | |
UIDebuggingInformationOverlay = ObjCClass('UIDebuggingInformationOverlay') | |
@on_main_thread | |
def toggle_overlay(): | |
UIDebuggingInformationOverlay.prepareDebuggingOverlay() | |
UIDebuggingInformationOverlay.overlay().toggleVisibility() |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/sandbox_email_interceptor.rb | |
ActionMailer::Base.register_interceptor(SandboxEmailInterceptor) unless Rails.env.production? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var poll = function(){ | |
window.scrollTo(0, document.body.scrollHeight); | |
setTimeout(function(){ poll() }, 500); | |
}; | |
poll(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'childprocess' | |
guard 'shell' do | |
watch %r{^app/(.+)\.rb$} do |m| | |
`killall rake` | |
# Why this: | |
# - spawn a child process to avoid locking Guard | |
# - make sure that the child process has stdout and stdin otherwise it crashes | |
# - bonus point: get REPL access in the simulator! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'logger' | |
# rotatelogs required... | |
# http://httpd.apache.org/docs/2.2/programs/rotatelogs.html | |
logger = Logger.new("|rotatelogs ./foo.log.%Y-%m-%d-%H 3600", 0, 0) | |
10.times do | |
logger.error "testing..." |
NewerOlder