Skip to content

Instantly share code, notes, and snippets.

View Shilo's full-sized avatar

Shilo Shilo

View GitHub Profile
@Shilo
Shilo / TextEdit_Auto_New_Doc.sh
Created June 8, 2014 03:17
Terminal command to automatically open new document upon start of TextEdit.
defaults write -g NSShowAppCentricOpenPanelInsteadOfUntitledFile -bool false
app id = de.xida.example
install:
adb install yourapk.apk
uninstall:
adb uninstall de.xida.example
kill task
adb shell am force-stop de.xida.example
@Shilo
Shilo / SPViewController+AutoRotationFix.h
Created July 2, 2014 15:14
Category for Sparrow to fix stretching on auto rotation.
//
// SPViewController+AutoRotationFix.h
// Barebone
//
// Created by Shilo White on 7/2/14.
//
//
#import <Sparrow/Sparrow.h>
@Shilo
Shilo / SPStage+AutoRotationFix.h
Created July 2, 2014 15:14
Category for Sparrow to fix stretching on auto rotation. (Alternative)
//
// SPStage+AutoRotationFix.h
// Barebone
//
// Created by Shilo White on 7/2/14.
//
//
#import <Sparrow/Sparrow.h>
@Shilo
Shilo / SPViewController+AutoRotationBorderColor.h
Last active August 29, 2015 14:03
Category for Sparrow to change the color of SPViewController auto rotation border.
//
// SPViewController+AutoRotationBorderColor.h
// Barebone
//
// Created by Shilo White on 7/3/14.
//
//
#import <Sparrow/Sparrow.h>
@Shilo
Shilo / SPStage+AutoRotationFix.h
Created July 3, 2014 14:08
Category for Sparrow to fix stretching and center stage on auto rotation.
//
// SPStage+AutoRotationFix.h
// Barebone
//
// Created by Shilo White on 7/2/14.
//
//
#import <Sparrow/Sparrow.h>
// These two need to be declared outside the try/catch
// so that they can be closed in the finally block.
HttpURLConnection urlConnection = null;
BufferedReader reader = null;
// Will contain the raw JSON response as a string.
String forecastJsonStr = null;
try {
// Construct the URL for the OpenWeatherMap query
Httpconnection connection = null;
BufferedReader reader = null;
String forecastJsonStr = null;
try {
URL url = new URL("http://api.openweathermap.org/data/2.5/forecast/daily?q=94043&mode=json&units=metric&cnt=7");
connection = (Httpconnection) url.openConnection();
connection.setRequestMethod("GET");
connection.connect();
@Shilo
Shilo / create_dummy_images.sh
Last active August 29, 2015 14:05
Terminal command to create dummy images.
curl -L "http://dummyimage.com/600x400/000/fff&text=DummyImage%20[01-10]" -o image_#1.png
@Shilo
Shilo / thunderbird_instructions.doc
Last active August 29, 2015 14:06
Thunderbird Instructions.
When you see the application of Thunderbird, don't you get too scared.
Just grab your Mac buddy, and say these magic words:
Fuck you, Thunderbird! You can suck my dick.
You cant get me, Thunderbird, because you're just Mozilla's farts.