Skip to content

Instantly share code, notes, and snippets.

@rsds143
rsds143 / tmux.conf
Created January 21, 2011 05:39
my tmux file
# $Id: vim-keys.conf,v 1.2 2010/09/18 09:36:15 nicm Exp $
#
# vim-keys.conf, v1.2 2010/09/12
#
# By Daniel Thau. Public domain.
#
# This configuration file binds many vi- and vim-like bindings to the
# appropriate tmux key bindings. Note that for many key bindings there is no
# tmux analogue. This is intended for tmux 1.3, which handles pane selection
# differently from the previous versions
@gasman
gasman / gfm.py
Created March 6, 2011 00:57 — forked from mvasilkov/gfm.py
import re
from hashlib import md5
def gfm(text):
# Extract pre blocks.
extractions = {}
def pre_extraction_callback(matchobj):
digest = md5(matchobj.group(0).encode('utf-8')).hexdigest()
extractions[digest] = matchobj.group(0)
return "{gfm-extraction-%s}" % digest
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@iamgreaser
iamgreaser / aimblock.py
Created October 18, 2011 09:27
aimblock for pyspades - an aimbot detector
# AImBlock - aimbot detection script
#
# The point of this script is to detect aimbots
# WITHOUT resorting to a hit-to-miss ratio.
#
# Current detection methods:
# - if one changes target, determine how accurate the gun is with respect to the head
# - if one gets a lot of kills quickly it will warn the admins over IRC
#
# There are more possible methods that can be used, but for now, this should work.
from __future__ import division
import math, struct
import time as time_module
import node, player, constants, function
import client as cl
class Nodemap(object):
# Minimum distance nodes have to have from one-another to exist - aka Optimization
/*
* Reviewing ray-tracing basics in glsl. Loosely based on Inigo Quilez's articles.
* Éric Renaud-Houde - num3ric.com
* December 2012
*/
#ifdef GL_ES
precision highp float;
#endif
diff -r dd56a497bb3b server/server.h
--- a/server/server.h Tue Sep 04 07:31:03 2012 +0000
+++ b/server/server.h Tue Oct 02 10:24:55 2012 +0000
@@ -271,6 +271,9 @@
//ugly hack for variable FPS support dropping s.event
int entity_events[MAX_EDICTS];
+
+ usercmd_t cmdHist[2];
+ int snaps;
@wandernauta
wandernauta / sp
Last active July 10, 2024 07:57
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@opatut
opatut / love-android-package
Created February 18, 2014 21:31
Android Löve2D debugging helper
#!/bin/bash
GAME=$1
DIR="/sdcard/love"
MIME="application/x-love-game"
INTENT="org.love2d.android/.GameActivity"
if [[ -z "$1" ]]; then
GAME="game.love"
echo "Creating game package at $GAME"
@msmuenchen
msmuenchen / gist:9318327
Last active September 18, 2022 21:53
KeePass v2.x (KDBX v3.x) file format
Convention: Byte array notation as it would appear in a hexeditor.
= Layout=
KDBX files, the keepass database files, are layout as follows:
1) Bytes 0-3: Primary identifier, common across all kdbx versions:
private static $sigByte1=[0x03,0xD9,0xA2,0x9A];
2) Bytes 4-7: Secondary identifier. Byte 4 can be used to identify the file version (0x67 is latest, 0x66 is the KeePass 2 pre-release format and 0x55 is KeePass 1)