Skip to content

Instantly share code, notes, and snippets.

View alexclifford's full-sized avatar

Alex Clifford alexclifford

  • Melbourne, Australia
View GitHub Profile
// Package ddblock provides a...
// TODO:
package ddblock
import (
"errors"
"fmt"
//"runtime"
"strconv"
"sync"
// Buy Binds
// Hold down Alt to activate weapon buy binds on
// 1 2 3
// Q W E
// A S D
// Z X C
bind "alt" "+bs"
bind 1 "1a"
bind 2 "2a"
// Launch Options
// -high -novid -dxlevel 81 -lv -nojoy -noaafonts -threads 4 +exec autoexec.cfg
con_enable "1"
cl_autowepswitch "0"
cl_use_opens_buy_menu "0"
closeonbuy "1"
// Mouse
sensitivity "0.9"
@alexclifford
alexclifford / environment
Created September 15, 2016 07:55
Ubuntu environment file - don't leave Steam window open when closed (minimise properly)
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
STEAM_FRAME_FORCE_CLOSE=1
@alexclifford
alexclifford / .vimrc
Last active March 18, 2020 15:41
My old .vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
set noexpandtab
set copyindent
set preserveindent
set softtabstop=0
set shiftwidth=8
set tabstop=8
set hlsearch
@alexclifford
alexclifford / cinnamon-dconf-backup-and-restore.sh
Created September 15, 2016 07:53
Backup Cinnamon settings with dconf
# Backup
dconf dump /org/cinnamon/ > cinnamon-dconf-settings.txt
# Reset Cinnamon
dconf reset -f /org/cinnamon/
# Restore
dconf load /org/cinnamon/ < cinnamon-dconf-settings.txt
@alexclifford
alexclifford / vim_auto_indent.instructions
Created May 2, 2016 00:29
Enable automatic HTML indenting in VIM
:filetype indent on
:set filetype=html
:set smartindent
gg=G
@alexclifford
alexclifford / delete_graylog_index.sh
Created May 2, 2016 00:28
Delete a Graylog Elasticsearch index
curl -XDELETE 'http://localhost:9200/graylog2_0/'
@alexclifford
alexclifford / adhoc_php_debugging.php
Created August 6, 2015 01:14
Some (poor) adhoc PHP debug logging code
file_put_contents('/tmp/foo/bar.txt', print_r(, true), FILE_APPEND);
file_put_contents('/tmp/foo/bar.txt', "5:\n\n", FILE_APPEND);
@alexclifford
alexclifford / s3_set_object_public.sh
Created July 24, 2015 01:59
Make S3 object public and private via s3cmd command line
s3cmd setacl s3://bucket/path/to/file --acl-public
s3cmd info s3://bucket/path/to/file
s3cmd setacl s3://bucket/path/to/file --acl-private