Skip to content

Instantly share code, notes, and snippets.

View rougeth's full-sized avatar

Marco Rougeth rougeth

View GitHub Profile
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

Here's how to install PostgreSQL and have it run automatically at startup, on an Ubuntu 10.04 virtual machine using Vagrant. This took me a while to figure out:

Add the default lucid32 base box to your vagrant, if you haven't already:

host> vagrant box add lucid32 http://files.vagrantup.com/lucid32.box 

Now make a new lucid32 virtual machine and install postgresql on it:

@obormot
obormot / udplb.py
Created December 8, 2012 23:25
Simple UDP load balancer
#!/usr/bin/env python
#------------------------------------------------------------------------------
# UDP Load Balancer featuring simple round robin with session affinity.
#------------------------------------------------------------------------------
import sys
import signal
import logging
from socket import *
@juanplopes
juanplopes / dfa.py
Last active September 28, 2021 16:37
simple dfa in python
class Automaton:
def __init__(self, nstates):
self.transitions = [{} for i in range(nstates)]
self.accept_states = [False] * nstates
def register(self, source_state, char, target_state):
self.transitions[source_state][char] = target_state
def register_accept(self, state):
self.accept_states[state] = True
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.20179691910743713</real>
<key>Green Component</key>
<real>0.1818026602268219</real>
@sloria
sloria / bobp-python.md
Last active April 20, 2024 13:02
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@zenorocha
zenorocha / .hyper.js
Last active November 12, 2023 15:13 — forked from millermedeiros/osx_setup.md
Setup macOS Sierra (10.12)
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
@pascalpoitras
pascalpoitras / config.md
Last active April 8, 2024 18:58
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@rafaelrinaldi
rafaelrinaldi / README.md
Last active December 15, 2015 16:57
Signing Git commits

Signing Git commits

Why

Because after reading this blog post (sent by my dear friend @hugobessaa) I got paranoid. It's a little effort that can avoid a lot of trouble.

The problem

  1. User changes the commit author using the --author option
  2. The commit then introduces a new bug (blaming the new author)
@junkblocker
junkblocker / ARCHANONIRC.md
Created March 23, 2016 18:16 — forked from zotherstupidguy/ARCHANONIRC.md
A Quick Guide for Anonymous and Pseudonymous irc

##Weechat+Arch Linux+Tor ###A Quick Guide for Anonymous and Pseudonymous irc I'm going to assume you know what irc is, and generally how it works. If you haven't gotten that far watch a youtube video and try out some of the commands on an irc webclient somewhere. On Arch Linux to install Weechat you can run sudo pacman -S weechat or you can download it from the official website at http://weechat.net/download/.

You can also install Tor from the official repositories, but If you are going to be making multiple connections to irc networks and you want to keep your identities seperate, I would recommend installing the Tor Browser Bundle as well. This should be done from the Tor website, and you should check the GnuPG signature on the package before running it. The key they have been using to sign the packages with for the months that I have been verifying it i