Skip to content

Instantly share code, notes, and snippets.

View tfogo's full-sized avatar

Tim Fogarty tfogo

View GitHub Profile
@tfogo
tfogo / xmonad.hs
Last active December 21, 2015 05:49
This is my xmonad config file.
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
import Control.Concurrent
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.NoBorders
@tfogo
tfogo / .global_gitignore
Last active December 21, 2015 12:38
My global gitignore file. Based on files in Github's gitignore repo (https://github.com/github/gitignore) It ignores common files from eclipse and emacs. Unlike Github's file, it does not ignore .project, .classpath, or .settings/.
# FOR ECLIPSE
*.pydevproject
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
@tfogo
tfogo / .gitignore
Last active December 21, 2015 12:38
Android .gitignore based on Github's useful gitignore repo (https://github.com/github/gitignore). This file does not ignore .project or .classpath files.
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
@tfogo
tfogo / .xmonadstartup
Created August 23, 2013 05:11
This is the script executed by xmonad.hs when xmonad starts up.
#!/bin/bash
gnome-settings-daemon &
feh --bg-fill ~/Pictures/wallpaper-1950578.jpg
xcompmgr -n &
trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 10 --transparent true --alpha 0 --tint 0x002b36 --height 19 &
nm-applet --sm-disable &
eval $(gnome-keyring-daemon --start)
export GNOME_KEYRING_SOCKET
export GNOME_KEYRING_PID
@tfogo
tfogo / .xmobarrc
Created August 23, 2013 05:16
This is my xmobar config.
Config { font = "xft:inconsolata:size=10:antialias=true"
, bgColor = "#002b36"
, fgColor = "#657b83"
, position = TopW L 90
, lowerOnStart = True
, commands = [ Run Network "wlan0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Date "<fc=#93a1a1>%a %b %_d %Y %H:%M</fc>" "date" 10
, Run DiskIO [("/", "IO: <total>"), ("sda4", "<total>")] [] 10
@tfogo
tfogo / liwpp.js
Last active December 25, 2015 09:59 — forked from SeraphimSerapis/liwpp.js
'use strict';
var request = require('request');
var querystring = require('querystring');
/*
* CLIENT DETAILS
*/
var CLIENT_ID = "CLIENT_ID_HERE";
@tfogo
tfogo / hacksocres.md
Last active December 25, 2015 19:59
HackSoc Notts resources, tailored for beginners.

Resources

About hackathons

Hackathons (or hack days) are super awesome events where people meet to build cool things. They're usually 24 hours straight programming/tinkering/building. Everybody gets involved, helps make something, then shows it to everybody else. Don't worry if you haven't been to one before, come along and you'll learn tons and have some great fun. Hackathons are pretty lighthearted and everyone's very helpful. Check out some past hackathons HackSoc have been to here: http://hacksocnotts.co.uk/category/news/

Preparing for a hackathon

@tfogo
tfogo / 0_reuse_code.js
Created October 17, 2013 21:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// This is why everyone needs jQuery in their lives...
$('img').each(function(){$(this).attr('src','http://www.placekitten.com/'+(Math.floor(Math.random()*100)+150)+'/'+(Math.floor(Math.random()*100)+150))});
@tfogo
tfogo / mongoose_example.js
Created October 26, 2013 12:36
MongoDB example with Mongoose
var express = require('express'),
app = module.exports = express.createServer(),
routes = require('./routes'),
mongoose = require('mongoose');
//MongoStore = require('connect-mongo')(express);
mongoose.connect('mongodb://localhost/randomstuffwhey');
var app = module.exports = express.createServer();