Skip to content

Instantly share code, notes, and snippets.

View sammcgrail's full-sized avatar
🎯
Focusing

Sam McGrail sammcgrail

🎯
Focusing
View GitHub Profile
@geek-at
geek-at / trash.sh
Created August 13, 2020 07:27
The script used to trash a banking phishing site
#!/bin/bash
while :; do
verf=$(cat /dev/urandom | tr -dc '0-9' | fold -w 8 | head -n 1)
pin=$(cat /dev/urandom | tr -dc '0-9' | fold -w 5 | head -n 1)
ip=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))")
@beesandbombs
beesandbombs / sea.pde
Created November 30, 2017 01:50
the sea
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@thomascchen
thomascchen / ember-resources.md
Last active October 20, 2015 00:52
Ember Resources

Resources for Learning Ember.js

Here's a list of resources that have been helpful for me in getting acquainted with Ember.js, in no particular order. Ember is relatively young and changing really fast, so I found that searching for answers on Google and Stack Overflow was not quite as easy as it is with Rails. Try to stick with resources that have been written in the past few months. Look at the older stuff too but remember that things have likely changed.

@coolaj86
coolaj86 / github-pages-https-lets-encrypt.md
Last active November 16, 2021 22:36
Github Pages: Let's Encrypt!
@xguse
xguse / noise.sh
Last active November 21, 2022 12:14 — forked from rsvp/noise.sh
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-10-04
#
# _______________| noise : ambient Brown noise generator (cf. white noise).
#
# Usage: noise [minutes=59] [band-pass freq center=1786] [wave]
# ^minutes can be any positive integer.
# Command "noise 1" will display peak-level meter.
#
# Dependencies: play (from sox package)
@MalphasWats
MalphasWats / flask_ajax.py
Created July 2, 2012 08:15
Making a basic AJAX request with Flask
# Answer to a question on Flask mailing list
# http://librelist.com/browser//flask/2012/6/30/using-ajax-with-flask/
# NOTE: *REALLY* don't do the thing with putting the HTML in a global
# variable like I have, I just wanted to keep everything in one
# file for the sake of completeness of answer.
# It's generally a very bad way to do things :)
#
from flask import (Flask, request, jsonify)
app = Flask(__name__)
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')