#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
:root { | |
--ease-in-quad: cubic-bezier(.55, .085, .68, .53); | |
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19); | |
--ease-in-quart: cubic-bezier(.895, .03, .685, .22); | |
--ease-in-quint: cubic-bezier(.755, .05, .855, .06); | |
--ease-in-expo: cubic-bezier(.95, .05, .795, .035); | |
--ease-in-circ: cubic-bezier(.6, .04, .98, .335); | |
--ease-out-quad: cubic-bezier(.25, .46, .45, .94); | |
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1); |
# Xcode 7 beta | |
cd /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib | |
sudo mv dyld_sim dyld_sim.orig | |
cd /Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/lib | |
sudo mv dyld_sim dyld_sim.orig | |
# Xcode 6.4 | |
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib | |
sudo mv dyld_sim dyld_sim.orig |
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
$ # install QCacheGrind (KCacheGrind) | |
$ brew install qcachegrind | |
$ brew install graphviz | |
$ brew linkapps | |
$ pip install django-extensions | |
$ # run profiling server | |
$ ./manage.py runprofileserver 0:3000 --kcachegrind --prof-path=path/to/profiles |
$ # Mavericks | |
$ sudo ~/Desktop/Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Mavericks --applicationpath ~/Desktop/Mavericks.app --nointeraction | |
$ # macOS Sierra | |
$ sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Sierra --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction |
$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install fabric |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
diff -rupN old/ansi.c new/ansi.c | |
--- old/ansi.c 2006-05-02 05:58:25.000000000 -0700 | |
+++ new/ansi.c 2010-12-31 14:10:12.000000000 -0800 | |
@@ -559,7 +559,7 @@ register int len; | |
{ | |
case '0': case '1': case '2': case '3': case '4': | |
case '5': case '6': case '7': case '8': case '9': | |
- if (curr->w_NumArgs < MAXARGS) | |
+ if (curr->w_NumArgs >= 0 && curr->w_NumArgs < MAXARGS) | |
{ |
#!/bin/bash | |
python -c "import site; print(site.getsitepackages())" |
A defensive program is one where the programmer does not "trust" the input data to the part of the system they are programming. In general one should not test input data to functions for correctness. Most of the code in the system should be written with the assumption that the input data to the function in question is correct. Only a small part of the code should actually perform any checking of the data. This is usually done when data "enters" the system for the first time, once data has been checked as it enters the system it should thereafter be assumed correct.
Example:
%% Args: Option is all|normal
get_server_usage_info(Option, AsciiPid) ->
Pid = list_to_pid(AsciiPid),