Skip to content

Instantly share code, notes, and snippets.

View helmus's full-sized avatar
🎩
I'm fixing your code

Willem D'Haeseleer helmus

🎩
I'm fixing your code
View GitHub Profile
@helmus
helmus / git-live
Last active August 29, 2015 14:17
# ~/bin/git-live
# Make sure ~/bin is added to PATH
# homebrew install fswatch
PREV=''
gstat()
{
clear
# disable line wrapping
printf '\033[?7l'
<!doctype html>
<html ng-app="Demo" ng-controller="AppController">
<head>
<meta charset="utf-8" />
<title>
Creating Asynchronous Alerts, Prompts, And Confirms In AngularJS
</title>
</head>
<body>
@helmus
helmus / gist:6339535
Created August 26, 2013 09:16
Test Gist
removed 1 record
Add: _bird1.jpg
change: _bird1.jpg
change: _bird1.jpg
Add: Siberian-Tiger-Running-Through-Snow-Tom-Brakefield-Getty-Images-200353826-001.jpg
change: Siberian-Tiger-Running-Through-Snow-Tom-Brakefield-Getty-Images-200353826-001.jpg
change: Siberian-Tiger-Running-Through-Snow-Tom-Brakefield-Getty-Images-200353826-001.jpg
Add: Best_Images.jpg
change: Best_Images.jpg
change: Best_Images.jpg
public void Save()
{
var writer = new StreamWriter(filename);
writer.Write(JsonConvert.SerializeObject(this, Formatting.Indented));
writer.Close();
}
@helmus
helmus / pokeUser.js
Created November 6, 2011 19:34
poke function for facebook, requires "$jq" global as jQuery
var pokeUser = function( victem ){
$jq.ajax( {
"url": "https://www.facebook.com/ajax/poke.php?__a=1",
"type": "POST",
"data": {
"__d" : 1,
"__user" : Env.user,
"fb_dtsg" : Env.fb_dtsg,
"lsd" : "",
"nctr[_mod]" : "pagelet_header_personal",
@helmus
helmus / FB_Pull_Injection.js
Created November 6, 2011 19:27
A quick and dirty hack to plug in to the Facebook Notification system. It's called after each pull request, so you can not acces the response object, yet...
(function(){
// store facebook's AjaxRequest class in our private variable
window.__AjaxRequestProxy__ = window.AjaxRequest;
// overwrite facebook's AjaxRequest class
window.AjaxRequest = function(b, d, c) {
/*
Enter code here
*/
// steal the cosntructor to mimic functionality