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
| # source this code in a Bash shell ($ . django-csrftoken-login-demo.bash), | |
| # and run with a DB name as parameter (e.g. $ django-csrftoken-login-demo demo) | |
| django-csrftoken-login-demo() { | |
| # -- CHANGE THESE VALUES TO MATCH YOUR ACCOUNT -- | |
| local HOSTING_USERID=9988 | |
| local HOSTING_PANEL_USER='customer@email.address' | |
| local HOSTING_PANEL_PASS='my secret login password' | |
| local HOSTING_DB_PREFIX='username_' | |
| local DB_NAME=$HOSTING_DB_PREFIX$1 |
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 multiprocessing as mp | |
| import os | |
| import time, random | |
| def f(x): | |
| b = x*x | |
| time.sleep(random.choice([5,8,10,14,20])) | |
| print "{0} procces id {1} with parent {2} doing {3}".format(mp.current_process(), os.getpid(), os.getppid(), x) | |
| return b |
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
| while true | |
| do | |
| echo -n "stats.timers.kamon.localhost.system-metric.cpu.cpu-user.mean_99:$(((RANDOM % 10) + 1))|c" | nc -w 1 -u localhost 8125 | |
| done |
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
| # After spending too much time away from Python on Javascript, I gave this a shot. To my surprise, it worked! | |
| # Since Python doesn't bind "self" explicitly in classes, this looks almost exactly like Python classes. | |
| # The only visible difference is that you cannot simply access the members using the dot syntax (cat.sayHi). | |
| # It must be accessed as a dictionary. | |
| def Cat(legs, colorId, name): | |
| def sayHi(): | |
| print 'Hi, my name is %s. I have %s legs and am %s.' % (this['name'], this['legs'], this['color']) | |
| this = { |
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 OAuth { | |
| public static HttpRequest signRequest(HttpRequest req, String consumerKey, String consumerSecret) { | |
| String nonce = String.valueOf(Crypto.getRandomLong()); | |
| String timestamp = String.valueOf(DateTime.now().getTime() / 1000); | |
| Map<String,String> parameters = new Map<String,String>(); | |
| parameters.put('oauth_signature_method','HMAC-SHA1'); | |
| parameters.put('oauth_consumer_key', consumerKey); | |
| parameters.put('oauth_timestamp', timestamp); |
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
| execve("/usr/local/bin/copyq", ["copyq", "-s", "zsh", "show"], [/* 67 vars */]) = 0 | |
| brk(0) = 0x21b6000 | |
| access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
| mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9593757000 | |
| access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
| open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 | |
| fstat(3, {st_mode=S_IFREG|0644, st_size=151268, ...}) = 0 | |
| mmap(NULL, 151268, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9593732000 | |
| close(3) = 0 | |
| access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) |
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 | |
| # An enhancement to the "python" executable that automatically launches you into the python debugger on error. | |
| # | |
| # Use it like you would the "python" executable, for example: | |
| # $ trypy somefile.py | |
| # or | |
| # $ trypy somefile.py arg1 arg2 | |
| # | |
| # EXAMPLE: |
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
| I was visited by the gains fairy this week. | |
| There's this massive bald black dude who works out early in the morning. There's no way he isn't juicing. His tank top looks like a g string on him, he's got veins popping out everywhere. I swear this dude has visible capillaries, it's unreal. He sweats like he's in a sauna the whole time, just dripping. Carries 2 towels around. Yells on the way up when he squats. Talks to himself in the mirror shrugging. I was embarrassed to ask him for a spot the first time, just because my 2 plate bench seemed so feeble next to this monster of a man. But it was 5:30 AM, and it was him or the fat guy doing curls with kettlebells. | |
| Anyways, so I'm only looking for 1 rep on this set (5/3/1) but hoping for 2. He doesn't touch the bar, thank god. I Get the first rep with great form, then struggle to get the second rep up. He leans over me and yells, "YOU'VE GOT 3!" I'm startled, but what the hell, he can bail me out if I fail. So I pause at the top and try 3. On my way up, he's still |
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
| from snake import * | |
| import pyperclip | |
| from sh import xdotool | |
| import random | |
| import string | |
| @key_map("<leader>l") | |
| def log(): | |
| ''' |
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
| //Based on gulpfile.js from Google Web Starter Kit. | |
| //https://github.com/google/web-starter-kit | |
| 'use strict'; | |
| // Include Gulp & Tools We'll Use | |
| var gulp = require('gulp'); | |
| var $ = require('gulp-load-plugins')(); | |
| var del = require('del'); | |
| var runSequence = require('run-sequence'); | |
| var browserSync = require('browser-sync'); |