Skip to content

Instantly share code, notes, and snippets.

View loisaidasam's full-sized avatar
🙌
🙌

Loisaida Sam loisaidasam

🙌
🙌
View GitHub Profile
@aseemk
aseemk / README.md
Last active February 14, 2018 16:41
A bookmarklet for "selecting all" (technically, "toggling all") checkboxes on the Amazon AWS S3 console.
@sspross
sspross / DJANGO_TWISTED_HAPROXY.md
Last active November 13, 2023 03:15
Serving Django and Twisted using HAproxy

Serving Django and Twisted using HAproxy

Why?

Because we wanted to achive the following while developing a webapp using websockets:

Static serving (nginx), Django application (gunicorn) and Websockets service (twisted)

  • on the same IP
@zacharyvoase
zacharyvoase / README.md
Last active May 21, 2020 06:19
A li’l class for data URI manipulation in Python.

DataURI.py

Data URI manipulation made easy.

This isn't very robust, and will reject a number of valid data URIs. However, it meets the most useful case: a mimetype, a charset, and the base64 flag.

Parsing

@oogali
oogali / startoftheday.pl
Created May 31, 2013 15:30
Get sunrise times?
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
$city = shift || die "startoftheday <city> <state>";
$state = shift || die "startoftheday <city> <state>";
@time = localtime;
$year = $time[5] + 1900;
@willurd
willurd / web-servers.md
Last active November 30, 2025 18:21
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active October 22, 2025 20:58
Backend Architectures Keywords and References
@rix501
rix501 / no-idea.coffee
Last active December 19, 2015 08:19
Hubot script for getting name-days for No Idea bar
# Description:
# Know name day in No Idea bar
#
# Dependencies:
# "cheerio": "0.12.0"
# "moment": "2.0.0"
#
# Configuration:
#
# Commands:
@pomack
pomack / http_echo_and_proxy_server.py
Created August 9, 2013 14:42
A simple python HTTP server that either serves as a proxy or as an echo server. If working as an echo server, it outputs the headers and body into log output and to the client, which is useful when debugging a reverse proxy or caching server to see what is being sent. If working as a proxy server, it outputs what the request headers will be to t…
#!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import StringIO
import argparse
import logging
import os
import random
import sys
import urllib2
@jbenet
jbenet / simple-git-branching-model.md
Last active July 21, 2025 21:02
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@jdp
jdp / rdb2proto.py
Created October 10, 2013 21:16
dump redis protocol from rdb file
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import calendar
import sys
import rdbtools
def emit_protocol(*args):