Skip to content

Instantly share code, notes, and snippets.

PyCon 2012 Digest

from DevOps team {rduplain,mattd,teebes}, to mobile developers at WillowTree Apps

Pronunciation

#include <stdio.h>
struct A {
int a;
char b;
};
struct A foo() {
struct A a;
a.a = 3;
@ifduyue
ifduyue / 0_reuse_code.js
Created May 24, 2014 11:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/bin/bash
# this will install everything as root, so take that into account before you run it
set -eu
# need cmake, python development headers, ZLib and OpenSSL
sudo apt-get install -y cmake python2.7-dev zlib1g-dev libssl-dev
root=`pwd`
#!/bin/bash
# this will install everything as root, so take that into account before you run it
set -e
# need cmake, python development headers, ZLib and OpenSSL
sudo yum groupinstall "Development tools" -y
sudo yum install cmake zlib-devel openssl-devel http-parser-devel -y
root=`pwd`
#coding: utf8
import re
import time
import datetime
import dateutil.tz
# Remember offset is in seconds west of UTC, but the timezone is in
# minutes east of UTC.
@ifduyue
ifduyue / changelog.txt
Last active February 26, 2020 08:18
The goods from okean.com
2020.02.19 1600 UTC
china
added: 103.148.174.0/23
2020.01.21 1702 UTC
china
added: 103.147.211.0/24
cat - << EOWARNING
WARNING: This script will fil up your left over disk space.
DO NOT RUN THIS WHEN YOUR VIRTUAL HD IS RAW!!!!!!
You should NOT do this on a running system.
This is purely for making vagrant boxes damn small.
Press Ctrl+C within the next 10 seconds if you want to abort!!
#!/usr/bin/perl
use 5.008;
use strict;
use Memoize;
# usage:
# git-large-files 500k
# git-large-files 0.5m
# git-large-files 5b