Skip to content

Instantly share code, notes, and snippets.

View loisaidasam's full-sized avatar
🙌
🙌

Loisaida Sam loisaidasam

🙌
🙌
View GitHub Profile
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@subfuzion
subfuzion / curl.md
Last active May 3, 2024 09:26
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@jdp
jdp / server.py
Created February 10, 2016 06:55
Serve directory listing kinda like a GitHub project page
#!/usr/bin/env python
import cgi
import os
import mistune
from SimpleHTTPServer import SimpleHTTPRequestHandler
from SocketServer import TCPServer
from cStringIO import StringIO
@cnizzardini
cnizzardini / nfl_teams.csv
Last active January 30, 2024 23:03
List of nfl teams as a CSV: name,abbreviation,conference,division for MySQL format. Please comment if you find any errors.
ID Name Abbreviation Conference Division
1 Arizona Cardinals ARI NFC West
2 Atlanta Falcons ATL NFC South
3 Baltimore Ravens BAL AFC North
4 Buffalo Bills BUF AFC East
5 Carolina Panthers CAR NFC South
6 Chicago Bears CHI NFC North
7 Cincinnati Bengals CIN AFC North
8 Cleveland Browns CLE AFC North
9 Dallas Cowboys DAL NFC East
@loisaidasam
loisaidasam / README.md
Last active October 19, 2023 16:07
Sort git tags by semver

If you're like me and you use semver for versioning your tags, you probably hate when you do this:

$ git tag -l
0.1.0
0.10.0
0.2.0
0.3.0
0.3.1
0.4.0

0.5.0

@benwilber
benwilber / timespec.yacc
Created August 26, 2015 00:04
at timespec
/*
* Abbreviated version of the yacc grammar used by at(1).
*/
%token <charval> DOTTEDDATE
%token <charval> HYPHENDATE
%token <charval> HOURMIN
%token <charval> INT1DIGIT
%token <charval> INT2DIGIT
%token <charval> INT4DIGIT
var active = false;
function changeRefer(details) {
if (!active) return;
for (var i = 0; i < details.requestHeaders.length; ++i) {
if (details.requestHeaders[i].name === 'Referer') {
details.requestHeaders[i].value = 'http://www.google.com/';
break;
}
@jdfr
jdfr / bigperm.py
Created April 26, 2015 15:15
Algorithmic pseudo-random permutations for large sequences
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License v2 as published by
#the Free Software Foundation.
"""Algorithmic pseudo-random permutations for large sequences.
Module to generate random, arbitrarily large permutations. Random permutations
can be generated in Python with random.shuffle or numpy.random.shuffle:
import random
@hery
hery / gist:d479478986ec5d9a7b85
Last active August 29, 2015 14:19
Transform Your (OS X) Box Into a Radio
Prerequisites
* SHOUTcast (http://www.shoutcast.com/BroadcastNow)
* Soundflower (https://rogueamoeba.com/freebies/soundflower/)
* butt (http://butt.sourceforge.net/)
* a computer
Set up Soundflower
* After installing Soundflower, set it as Output source in System Preferences
@beng
beng / apt-get-history.sh
Created December 2, 2014 21:03
A way to find all the stuff you manually installed on ubuntu via apt-get as found here: http://askubuntu.com/a/250530
(zcat $( ls -tr /var/log/apt/history.log*.gz ) ; cat /var/log/apt/history.log ) | egrep '^(Start-Date:|Commandline:)' | grep -v aptdaemon | egrep '^Commandline:'