Skip to content

Instantly share code, notes, and snippets.

View timothyasp's full-sized avatar
🐢
Turtles

Tim Asp timothyasp

🐢
Turtles
View GitHub Profile
@timothyasp
timothyasp / ass.sh
Created May 30, 2014 18:09
ASS: Android Screen Shot
ass () {
DATE=`date`
FILE="./Android Screen Shot $DATE.png"
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > "$FILE"
}
@timothyasp
timothyasp / gist:0028ea3731bd11457ede
Created August 8, 2014 16:54
LESS/CSS and PHTML vim config
// Plugins
https://github.com/othree/html5.vim
https://github.com/SirVer/ultisnips
https://github.com/skammer/vim-css-color
https://github.com/hail2u/vim-css3-syntax
https://github.com/groenewege/vim-less
// After installling all of those, add the following to your .vimrc
@timothyasp
timothyasp / gist:4115220
Created November 20, 2012 00:49
GET /guide/{guideid}/steps response
"steps": [
{
"title": "",
"lines": [
{
"text": "Place your thumbs in the depressions cut into the bottom cover.",
"text_raw": "Place your thumbs in the depressions cut into the bottom cover.",
"bullet": "black",
"level": 0
},
@timothyasp
timothyasp / gist:4129261
Created November 22, 2012 03:12
test test test
"video": {
"thumbnail": "http://s3.amazonaws.com/bucket/video/frame_0000.png",
"encoding": [
{
"width": 592,
"height": 444,
"max_video_bitrate": 1500,
"url": "http:\/\/ifixit-dev-guide-objects.s3.amazonaws.com\/igo\/video\/ifixit\/Yk3VcLPVMmdFWyYk_MP4_592.mp4",
"format": "mp4"
},
@timothyasp
timothyasp / gist:5173972
Last active December 15, 2015 00:38
Stack trace for guide save error after indents.
03-15 16:20:41.456: I/iFixit(17515): Performing API call: POST https://mzych.cominor.com/api/1.1/guides/16557/steps?revisionid=144284
03-15 16:20:41.456: I/iFixit(17515): Request body: {"media":{"data":[],"type":"image"},"orderby":7,"lines":[{"lineid":0,"bullet":"black","text":"kjhsldkjfh asljdkhf ljshf lkjhasdfl kjhasdlkfjh asdf","level":0},{"lineid":0,"bullet":"black","text":"asdkjf hasdlkfjh asljdkfh aslhjdf lajdshfl khasdf","level":1},{"lineid":0,"bullet":"black","text":" askjdfh asldkjfh ladhsjf asdfl; kasdkljf a;ljdsf","level":0},{"lineid":0,"bullet":"black","text":"asdfh aslkjfh askdjfh lkasdjhfl kjashdlfkj h","level":2}],"title":""}
03-15 16:20:42.056: I/iFixit(17515): Response code: 422
03-15 16:20:42.056: I/iFixit(17515): Response body: {"message":"Validation failed","errors":[{"resource":"Step line","field":"level","code":"invalid_value","message":"Invalid line indentation"}]}
03-15 16:20:42.071: E/iFixit(17515): API parse error
03-15 16:20:42.071: E/iFixit(17515): org.json.JSONException: No valu
W/System.err( 1620): javax.net.ssl.SSLException: Not trusted server certificate
W/System.err( 1620): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:371)
W/System.err( 1620): at com.squareup.okhttp.Connection.upgradeToTls(Connection.java:146)
W/System.err( 1620): at com.squareup.okhttp.Connection.connect(Connection.java:107)
W/System.err( 1620): at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:291)
W/System.err( 1620): at com.squareup.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:252)
W/System.err( 1620): at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:203)
W/System.err( 1620): at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:344)
W/System.err( 1620): at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:295)
W/System.err( 1620): at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getH
final static HostnameVerifier DO_NOT_VERIFY = new HostnameVerifier() {
public boolean verify(String hostname, SSLSession session) {
return true;
}
};
public static OkHttpClient createOkHttpClient() {
// Create a trust manager that does not validate certificate chains
TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
<iframe scrolling="no" marginwidth="0" marginheight="0" frameborder="0" name="1-0-2;2148;<script type='text/javascript'>document.write('<img src=&quot;http://adserver.adtechus.com/pubapi/3.0/10217.1/3695250/0/-1/ADTECH;cmd=win;adid=-1;pubseq=152843227693584809;pubitime=1501017476;bnid=0;pubadn=9034.1;pubws=260103;alias=rightrail_quiz_a_noopenx;bidfloor=0.25;misc=1501017476211;cors=yes&quot; width=&quot;1&quot; height=&quot;1&quot; style=&quot;display:none;&quot;>');
document.write(&quot;<scr&quot;+&quot;ipt type=\u0022text/javascript\u0022 src=\u0022http://pr.ybp.yahoo.com/ab/secure/false/imp/oy19RAtqcu66ffhQGTJLv6R7Mhm8Kdp636HjkgE2syUqmObJH8IWtEaipDr0gm2W6I6Rvjyh5e1_uL8ZxLqDhw5W-79L3TUNvYaXprXDptGXQoiVjKMF_XumqQwa-63j5sDV63kwMbCQXQaDeClOjY_gR94PcLWo14Ux9931xcB154-quBHq0conT7isxnfVKwCJbln0-A3iSZ9K0kzFHB05XO7TB_6phfjLETvfHSz9WmIsJQEdts-bljHxm4z6LvTCj0kH9weObBXdlJk8JDthbz3jpE7sQKS0n80q4tyjBEPzYRKsWuG5u3prHfUnuwJ5g_c-w1vYyFnQ0Am2RZOMFKot3KFpS-OuFNdhbxc4JNakBCA3QxNHJlvAsBukHMw-KFKoAGCTq_r2GtKyXfnwIOhxpTkRMZCXVlz8
@timothyasp
timothyasp / gist:bc2299e89bc84bd04774d6cd0fadc4a7
Created August 9, 2017 14:20
List of common "HEXSPEAK" codes, newline seperated
0x0000000ff1ce
0x00bab10c
0x8badf00d
0x1badb002
0x1ceb00da
0xb105f00d
0xb16b00b5
0xbaaaaaad
0xbaadf00d
0xbad22222
@timothyasp
timothyasp / gist:10113f1f5feee22060b8279bf606a021
Last active August 9, 2017 14:37
"Calculator Words" or Beghilos (50714938) - words that can be spelled with a seven-segment display when turned upside down (AKA math class in 6th grade)
5318008
58008
55378008
50714938
07734
5637335.1
1134206
3104558
379009
317537