This file contains hidden or 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
- (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions | |
{ | |
[NSClassFromString(@"WebView") _enableRemoteInspector]; | |
/** .. do your AppDelgate thing.. **/ | |
return YES; | |
} |
This file contains hidden or 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
/* | |
* | |
* PERSISTENT LOCALSTORAGE NATIVE SOLUTION for phonegap (tested on 1.3) | |
* iOS 5.1 puts LocalStorage in a vulnerable location (Libary/Caches). This will copy it to | |
* the documents folder as "appdata.db" so that it will be appropriately backed-up and not | |
* overwritten. If "appdata.db" doesn't exist, localStorage will not be overwritten. | |
* Also, upon application suspend (resignActive) or termination, localStorage is saved, so | |
* there should not be any chance that changes to localStorage won't be persisted. [[ short of a power-cycle ]] | |
* | |
* The following should be placed in AppDelegate.m. Note that it //partially// replaces |
This file contains hidden or 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
// Put code in MainViewController.m if using PhoneGap, | |
// else but it in ViewController controlling UIWebView | |
// Register for keyboard show event | |
// Some where in a init ex initWithNibName | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillShow:) | |
name:UIKeyboardWillShowNotification | |
object:nil]; |
This file contains hidden or 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
module CarrierWave | |
module MiniMagick | |
def toaster_filter | |
manipulate! do |img| | |
img.modulate '150,80,100' | |
img.gamma 1.1 | |
img.contrast | |
img.contrast | |
img.contrast | |
img.contrast |
This file contains hidden or 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
#!/bin/sh | |
######CONFIG##### | |
# TestFlight API Token | |
# from https://testflightapp.com/dashboard/team/edit/ | |
# $ git config --global testflight.apitoken XXX | |
# form https://testflightapp.com/account/#api | |
# $ git config --global testflight.teamtoken XXX | |
# Testflight API token | |
API_TOKEN=$(git config testflight.apitoken) |
This file contains hidden or 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
on run argv | |
set input_file to POSIX file (item 1 of argv) | |
set output_path to item 2 of argv | |
-- TODO: add some error handling :) | |
-- make sure output folder exists | |
do shell script "mkdir -p " & output_path | |
-- drop input file on Slicy app |
This file contains hidden or 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
$.get('http://www.posten.se/soktjanst/postnummersok/resultat.jspv?pnr=11240', function(data){ | |
console.log("Ort", $(data).find('td.lastcol').first().text()); | |
}); |
This file contains hidden or 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
SERVER=127.0.0.1 | |
USER=deployer | |
PASSWORD=superpass | |
ssh $SERVER | |
# add deployer user | |
groupadd admin | |
useradd $USER -m -s /bin/bash -G admin | |
echo $USER:$PASSWORD | chpasswd |
This file contains hidden or 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
[supervisord] | |
nodaemon=true | |
[program:sshd] | |
command=/usr/sbin/sshd -D | |
stdout_logfile=/var/log/supervisor/%(program_name)s.log | |
stderr_logfile=/var/log/supervisor/%(program_name)s.log | |
autorestart=true |