View gist:867c4af4275a79d97683
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
public static void Log(string message, params object[] ps) | |
{ | |
message = string.Format (message, ps); | |
var StackTrace = new System.Diagnostics.StackTrace(true); | |
var StackFrame = StackTrace.GetFrame(1); | |
string FileName = StackFrame.GetFileName(); | |
string LineNumber = StackFrame.GetFileLineNumber().ToString(); | |
Console.WriteLine("{0} ({1}): {2}", FileName, LineNumber, message); |
View gist:67d78152ee092fe60794
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
public class LastReturned { | |
Dictionary<Thread, object> Returned = new Dictionary<Thread, object>(); | |
public object Ret(object o) { | |
if (o != null) { | |
if (Returned.ContainsKey (Thread.CurrentThread)) { | |
Returned [Thread.CurrentThread] = o; |
View gist:76ae8c74736fa47b33a4
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/python | |
import sys | |
import os.path | |
import re | |
import subprocess | |
if len(sys.argv) < 4: | |
print "Usuage: ./getcrash.py AppName AppSymbol crashlog.ips" | |
print "Where AppName is the iOS app name without .app, AppSymbol the app name in the logs (usually almost the same as the AppName and the crash log file." |
View gist:b7777f0f766bddf93d2a
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
Undefined symbols for architecture x86_64: | |
"wxTreeListCtrl::DeleteItem(wxTreeListItem)", referenced from: | |
gd::ChooseVariableDialog::OnvariablesListKeyDown1(wxKeyEvent&) in ChooseVariableDialog.cpp.o | |
gd::ChooseVariableDialog::OnRemoveSelected(wxCommandEvent&) in ChooseVariableDialog.cpp.o | |
gd::ChooseVariableDialog::RefreshVariable(wxTreeListItem, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, gd::Variable const&) in ChooseVariableDialog.cpp.o | |
"wxTreeListCtrl::SetItemData(wxTreeListItem, wxClientData*)", referenced from: | |
gd::SpriteObjectEditor::RefreshCollisionMasks() in SpriteObjectEditor.cpp.o | |
"wxTreeListCtrl::SetItemText(wxTreeListItem, unsigned int, wxString const&)", referenced from: | |
gd::SpriteObjectEditor::RefreshCollisionMasks() in SpriteObjectEditor.cpp.o | |
gd::ChooseVariableDialog::RefreshVariable(wxTreeListItem, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, gd::Variable |
View gist:4d0973617d388f6b0873
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/perl | |
@x = `find .|grep mkv\$|grep "Season "|more`; | |
print `mkdir encdir`; | |
foreach(@x) { | |
chomp; | |
$f = $_; | |
/.*\/(.*).mkv/; | |
print "$1\n"; | |
$wav = "encdir/$1.wav"; |
View gist:d03bd370264f03294772
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
import json | |
import urllib2 | |
city="bristol" | |
country="united kingdom" | |
citry = city.replace(' ', '+') | |
country = country.replace(' ', '+') | |
response = urllib2.urlopen("http://nominatim.openstreetmap.org/search?q="+city+"+"+country+"&format=json") |
View gist:4afdb170e16ee49fba31
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
curl --data '{"email":"test7@ola.pt","password":"123456"}' http://iys.pixelly.co.uk/api/users/login/ --happlication/json"|perl -e '$l = <>; chomp($l); $uid=-1; foreach($l=~/\"UserId\"\: (\d+)/isgm) {chomp($_); if ($uid>0 and $_!=$uid){print "$_ is not $uid, AAARGH\n"; exit;}; $uid=$_; }' |
View gist:5194b3fe57b6ee05b0b4
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
cat x.asc |perl -e '@x=split(/\s/, <>); foreach(@x){print "$_\n";}' > x1.asc |
View prefetch.html
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
<!doctype html> | |
<html> | |
<head> | |
<title>Prefetch video</title> | |
</head> | |
<body> | |
<h1>Prefetch video</h1> | |
<p>Prefetch a video and know exactly how much is loaded using XHR.</p> | |
<video controls style="border:1px solid grey;"></video> |
View prefetch_localstorage.html
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
<!doctype html> | |
<html> | |
<head> | |
<title>Prefetch video</title> | |
</head> | |
<body> | |
<h1>Prefetch video</h1> | |
<p>Prefetch a video and know exactly how much is loaded using XHR.</p> | |
<video controls style="border:1px solid grey;"></video> |
OlderNewer