Skip to content

Instantly share code, notes, and snippets.

View kaimallea's full-sized avatar
:octocat:

Kai Mallea kaimallea

:octocat:
View GitHub Profile
@kaimallea
kaimallea / .vimrc
Last active June 22, 2019 20:30
.vimrc
set nocompatible " disable compatibility with legacy vi (i.e., enable 'new' features)
set autoindent " copy indent from current line when starting new line
set backspace=indent,eol,start " allow backspacing over autoindent, line breaks, start of insert
set cursorline " highlight the screen line of the cursor
set encoding=utf-8
set expandtab " in insert mode: use the appropriate number of spaces to insert a tab
if has("gui_running")
set antialias " use smooth (antialiased) fonts (OSX GUI only)
set guifont=Operator\ Mono:h16,Dank\ Mono:h16,Courier:h16 " list of fonts to use in GUI version of Vim
endif
@kaimallea
kaimallea / .zshrc
Last active June 22, 2019 20:30
zshrc for linux & osx
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
diff --git a/test/js/common.js b/test/js/common.js
index 8c26dd8..e891743 100644
--- a/test/js/common.js
+++ b/test/js/common.js
@@ -58,7 +58,7 @@ global.spweb = {};
html = '<html><body></body></html>';
}
- jsDomDocument = jsdom(html, null, {
+ jsDomDocument = jsdom(html, {
struct PlayerRoundStats_t {
int team, kills, deaths, clutch_kills;
};
typedef std::unordered_map<const char *, PlayerRoundStats_t> PlayerRoundStatsMap_t;
typedef std::unordered_map<int, PlayerRoundStatsMap_t> RoundStatsMap_t;
Represents:
@kaimallea
kaimallea / UDPClient.hpp
Created November 25, 2014 21:25
Super simple UDP client using boost
#include <iostream>
#include <boost/array.hpp>
#include <boost/asio.hpp>
using boost::asio::ip::udp;
class UDPClient
{
public:
UDPClient(
@kaimallea
kaimallea / keybase.md
Created April 16, 2014 14:53
keybase.md

Keybase proof

I hereby claim:

  • I am kaimallea on github.
  • I am kmallea (https://keybase.io/kmallea) on keybase.
  • I have a public key whose fingerprint is 7EBC 00A2 5D54 DA6F 137B 9325 2EBD 9C14 7D81 4E8D

To claim this, I am signing this object:

@kaimallea
kaimallea / autoexec.cfg
Last active August 18, 2024 05:26
CS:GO Autoexec file (goes in \Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg)
//Steam startup option: -novid -console -high -freq 120
//Network Commands
rate "128000"
cl_interp "0"
cl_interp_ratio "1"
cl_cmdrate "128"
cl_updaterate "128"
fps_max "300"
cl_showfps "1"
@kaimallea
kaimallea / .tmux.conf
Created November 11, 2013 23:36
Tmux Config
set-option -g default-terminal "screen-256color"
set-option -s escape-time 1
set-option -g base-index 1
# Bind v/h-split
bind | split-window -h
bind - split-window -v
@kaimallea
kaimallea / dl-config-make-install-vim.sh
Last active December 27, 2015 00:19
Download, configure, make (compile) and install VIM from source
#!/bin/bash
PYTHON_VERSION=2.7
# Dependencies
sudo apt-get update
sudo apt-get install mercurial python$PYTHON_VERSION-dev libperl-dev ruby-dev libncurses5-dev
# Clone vim repo; this takes some time
hg clone https://code.google.com/p/vim/
@kaimallea
kaimallea / gist:6258016
Created August 17, 2013 18:02
Supplant
if (typeof String.prototype.supplant !== 'function') {
String.prototype.supplant = function (o) {
return this.replace(/{([^{}]*)}/g, function (a, b) {
var r = o[b];
return typeof r === 'string' ? r : a;
});
}
}