Skip to content

Instantly share code, notes, and snippets.

View marksteve's full-sized avatar
🏠

Mark Steve Samson marksteve

🏠
View GitHub Profile
@marksteve
marksteve / tumbleed.py
Created March 6, 2011 04:59
Deletes all of your reblogs only (hopefully).
USERNAME = 'your_username'
EMAIL = 'your@email.com'
PASSWORD = 'yourpassword'
import urllib as u
import urllib2 as u2
import re
from lxml import etree as e3
total = -1
del_ids = []
i = 0
@marksteve
marksteve / gist:877210
Created March 19, 2011 04:04
Monokai Notepad2 Color Scheme
[Default Text]
FileNameExtensions=txt; text; wtx; log; asc; doc; diz; nfo
Default Style=font:Consolas; size:10; fore:#F8F8F2; back:#272822
Margins and Line Numbers=size:-2; fore:#BCBCBC; back:#3B3A32
Matching Braces=size:+1; bold; fore:#000000; back:#FD971F
Matching Braces Error=size:+1; bold; fore:#F8F8F0; back:#F92672
Control Characters (Font)=size:-1
Indentation Guide (Color)=fore:#A0A0A0
Selected Text (Colors)=fore:#F8F8F2; back:#49483E; eolfilled
Whitespace (Colors, Size 0-5)=
@marksteve
marksteve / Backbone.View.Autocomplete.js
Created May 3, 2011 10:54
Backbone View for jQuery UI Autocomplete inputs
var Autocomplete = Backbone.View.extend({
render: function() {
var choices = this.options.choices,
selected = this.options.selected,
iterator = this.options.iterator,
label = this.options.label,
allowDupes = this.options.allowDupes,
$el = $(this.el);
$el.autocomplete({
source: function(request, response) {
@marksteve
marksteve / tdaf.js
Created May 4, 2011 10:33
Tumblr Dashboard Anti-FUUUUUU!
javascript:(function(){if(typeof localStorage.turl=="undefined")localStorage.turl=decodeURIComponent(document.querySelector('#posts > li:last-child .post_controls a[href^="/reblog"]').href.split("=")[1]).replace("?lite","");else{var a=localStorage.turl,b=confirm("Do you want to go to saved position: "+a+"?");localStorage.removeItem("turl");if(b)location.href=a}})();
try:
# do something
except RequestError, response:
# handle exception
# response is an object
# dir(response) == ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__', '__getitem__', '__getslice__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__str__', '__weakref__', 'args', 'body', 'headers', 'message', 'reason', 'status']
@marksteve
marksteve / gist:1065195
Last active September 26, 2015 07:58
Fix "Show hidden files"
regsvr32 /i browseui.dll
regsvr32 /i shell32.dll
@marksteve
marksteve / cirml.sh
Created July 12, 2012 05:37
Can I run Mountain Lion?
echo "Can I run Mountain Lion? "
ioreg -l -p IODeviceTree | grep firmware-abi | sed -n '
'/EFI64/' {
i\
Yes
}
'/EFI64/' !{
i\
No
}'
curl -s https://raw.github.com/gist/3096054/f8ef32fa41f1e281f182c0d48caf5a4437510dc4/cirml.sh | sh
@marksteve
marksteve / jeje.py
Created August 30, 2012 09:13
A simple jeje encoder
import codecs
import re
import random
"""
jeje.py
A simple jeje encoder
In [1]: import jeje
$ python letterpress.py
5 vttplruohripniomtrptfaira
5 letters
votal volar vomit vitta vital virtu viron viral viola vinta vinal vapor valor varna varan vault vaunt truth trump troth trout trona troot troop tromp troft troat trior trifa trial trait trail train trant tramp trama tutor tutin tutti tulip turio turma tumor tufan tuath tuart tuarn tovar totum total topia tolan torta torii torma toral torah toran tourn tonal tooth tomin toman thruv thrum throu thrip thrap thram thulr thurt thurl thurm thump tholi thort thorp thorn thoro thoom thoft thirt thirl thiol thatn tharm tharf thana titar tipup tilth tirma tinta timor timon timar tiara tatou tatta tapul tapoa tapir tapia tappa talon talma talar talao tarot tarri tarin tarfa tarau taraf taupo taula taunt tahua tahil tahin taipo tairn taint tanti tanoa tanha tania tafia plump pluma plout ploat plait plain plant prunt proto proof proal prior prion print primp prima prana praam pupil pupal punto punti punta potto polio polar porto porta poral poult poulp pohna p