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
<!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> |
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
<!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> |
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
cat x.asc |perl -e '@x=split(/\s/, <>); foreach(@x){print "$_\n";}' > x1.asc |
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
curl --data '{"email":"[email protected]","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=$_; }' |
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
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") |
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
#!/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"; |
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
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 |
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
#!/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." |
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
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; |
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
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); |