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
var container = $('.markdown-body'), | |
classes = {}; | |
container.find('h2').each(function(i) | |
{ | |
var className = $(this).text().replace(/[^-a-zA-Z0-9_ ]+/g, '').trim(), | |
currentClass, next; | |
classes[className] = {}; | |
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 array | |
f = open('uncompressed_test_adx30.swf', 'r') | |
input = f.read(8) | |
chars = [ord(ch) for ch in input] | |
nbits = chars[0] >> 3 |
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
var myDirective = function() | |
{ | |
return { | |
template: '<div data-ng-include="template.url"></div>', | |
link: function(scope) | |
{ | |
scope.template = { url: '' }; | |
} | |
}; | |
} |
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
#!/bin/bash | |
MIN=$1 | |
MAX=$2 | |
NUM=$(( ( RANDOM % ( MAX - MIN + 1 ) + MIN ) )) |
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
// Change this to the URL of your profile where you'd like to start deleting posts. | |
var startUrl = 'http://www.reddit.com/user/YOUR_USER_NAME/?count=100&after=WHATEVER_THE_TAG_IS'; | |
function reload(cb) | |
{ | |
var newdoc=undefined; | |
$.ajax(startUrl).success(function(data) | |
{ | |
newdoc=$(data); |
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
var cb = function () | |
{ | |
var s = document.querySelector('head style:last-of-type'); | |
['/path/to/stylesheet/one.css','/path/to/stylesheet/two.css'] | |
.forEach(function (v) | |
{ | |
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = v; | |
s.parentNode.appendChild(l, s); | |
}); |
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
<RegistryInformation | |
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> | |
<DeviceUpdateKey> | |
<KeyName>Software\Microsoft\Windows\CurrentVersion\DeviceUpdate</KeyName> | |
<Subkeys> | |
<RegistryKey> | |
<KeyName>Software\Microsoft\Windows\CurrentVersion\DeviceUpdate\Agent</KeyName> | |
<Subkeys> | |
<RegistryKey> | |
<KeyName>Software\Microsoft\Windows\CurrentVersion\DeviceUpdate\Agent\Engine</KeyName> |
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
#include <stdio.h> | |
#include <conio.h> | |
#ifdef WIN32 | |
#include <windows.h> | |
double get_time() | |
{ | |
LARGE_INTEGER t, f; | |
QueryPerformanceCounter(&t); |
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
var art=' :.+8.\n\ | |
I=.$= O\n\ | |
7O?7D?O~I$\n\ | |
,+Z?+OI+:77\n\ | |
~Z+?OO$OO7I\n\ | |
.IOD?=$ZZO,\n\ | |
OI~IZ+~8=,\n\ | |
DDDDDDDDDDDDDDDDDDDD DDDD8 8DDDDDDDDDDDDDDDDDDDDD 7Z~+Z+$7D+?\n\ | |
DDDDDDDDDDDDDDDDDDDD8 DDDD8 8DDDDDDDDDDDDDDDDDDDDD =$II$Z~IZ+\n\ | |
DDDD8 DDDDD DDDD8 DDDDD ?$:==:~$O\n\ |
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
var Trampoline = (function () | |
{ | |
function Trampoline(func, baseConditionReachedFunc) | |
{ | |
var _this = this; | |
this.func = func; | |
this.baseConditionReachedFunc = baseConditionReachedFunc; | |
if (typeof func !== 'function') throw new Error('Wrong type'); |