Skip to content

Instantly share code, notes, and snippets.

View carlmartus's full-sized avatar

Martin Sandgren carlmartus

View GitHub Profile
#!/usr/bin/python
# HAIKU generator
# /g/ programming project for n00bs
from random import choice, randint
ENTRY = [ 'sitting', 'being', '>be 12', 'happily', 'regretfully' ]
INTERACTIONS = [
('on', 'sofa', 'laying'),
@carlmartus
carlmartus / commands.c
Last active August 29, 2015 13:57
Simple C commands program
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
static void
cmd_skeleton(int argc, const char **argv)
{
printf("Skeleton! With %d parameters\n", argc);
}
@carlmartus
carlmartus / webm_wincap.sh
Created April 9, 2014 08:17
Webm capture window with avconv
#!/bin/sh
SCREENRES=1280x1024
BITRATE=1000K
FPS=30
TEMP=`mktemp -u`
xwininfo > $TEMP
WINX=`grep "Absolute upper-left X" $TEMP | awk '{ print $4 }'`
WINY=`grep "Absolute upper-left Y" $TEMP | awk '{ print $4 }'`
WINW=`grep Width $TEMP | awk '{ print $2 }'`
@carlmartus
carlmartus / .vimrc
Last active August 29, 2015 14:00
Vim config (.vimrc)
execute pathogen#infect()
" Bundle: magic-dot-files/TagHighlight
" Bundle: scrooloose/nerdtree
" Bundle: itchyny/lightline.vim
if has("syntax")
syntax on
endif
if has("autocmd")
@carlmartus
carlmartus / .gvimrc
Last active August 29, 2015 14:00
GVim config (.gvim)
"set guifont=Terminus\ 11
"set guifont=ProggyCleanTT\ 12
"set guifont=Monospace\ 8
set guifont=Liberation\ Mono\ 9
set guioptions-=T
set guioptions-=t
set guioptions-=r
set guioptions-=m
set guioptions-=L
@carlmartus
carlmartus / .gtkrc-2.0
Created May 13, 2014 11:09
gvim black border
style "vimfix" {
bg[NORMAL] = "#242424" # this matches my gvim theme 'Normal' bg color.
}
widget "vim-main-window.*GtkForm" style "vimfix"
@carlmartus
carlmartus / tint2rc
Last active August 29, 2015 14:01
Tint 2 config
#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------
# For more information about tint2, see:
# http://code.google.com/p/tint2/wiki/Welcome
#
# For more config file examples, see:
# http://crunchbanglinux.org/forums/topic/3232/my-tint2-config/
# Background definitions
@carlmartus
carlmartus / rc.xml
Created May 19, 2014 07:30
Openbox config
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance>
<strength>20</strength>
<screen_edge_strength>40</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
@carlmartus
carlmartus / PS1
Last active August 29, 2015 14:01
PS1
PS1=' \[\e[1;33m\][ \[\e[2;30m\]\W \[\e[1;33m\]] # \[\e[0m'
alias sshc='ssh -C -c arcfour'
alias scpc='scp -C -c arcfour'
alias antq='ant -q'
alias youtube-dl='youtube-dl --no-part'
alias py3='python3'
alias cmake-clear='rm -rf CMakeCache.txt CMakeFiles'
@carlmartus
carlmartus / i3 config
Last active August 29, 2015 14:02
i3 config
# Save as .i3/config
# Using windows key
set $mod Mod4
font -misc-fixed-medium-r-normal--10-100-75-75-c-60-iso8859-1
floating_modifier $mod
hide_edge_borders both
force_focus_wrapping no
new_window none