Skip to content

Instantly share code, notes, and snippets.

View OkayDave's full-sized avatar

Dave OkayDave

  • Raylo
  • United Kingdom
View GitHub Profile
<html>
<body>
<h2>iframe</h2>
<textarea></textarea>
</body>
</html>
@OkayDave
OkayDave / .Xresources
Created August 6, 2014 07:38
unixporn
Xft.dpi: 96
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.autohint: false
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
*font: -gohu-gohufont-medium-r-normal--11-80-100-100-c-60-iso10646-1
#*font: -*-envy code r-medium-r-normal-*-17-120-100-*-*-*-iso10646-*
@OkayDave
OkayDave / gist:9092894
Created February 19, 2014 14:12
Dual screen wallpaper changing script
#!/usr/bin/env python
import glob
import random
import os
files = glob.glob("/home/dave/Pictures/wallpaper/*.jpg")
random.shuffle(files)
command = "feh --no-fehbg --bg-fill " + files[0] + " " + files[1]
@OkayDave
OkayDave / cudacontrol.py
Created February 1, 2014 20:10
Cudaminer temperature control
#!/usr/bin/env python
import subprocess
import time
def get_temp():
output = subprocess.check_output(" nvidia-smi | grep Default | cut -d' ' -f5", shell=True)
temp = float(output.strip().decode("utf-8")[0:-1])
print("tmp: " + str(temp))
return temp
require 'bundler/capistrano'
# This capistrano deployment recipe is made to work with the optional
# StackScript provided to all Rails Rumble teams in their Linode dashboard.
#
# After setting up your Linode with the provided StackScript, configuring
# your Rails app to use your GitHub repository, and copying your deploy
# key from your server's ~/.ssh/github-deploy-key.pub to your GitHub
# repository's Admin / Deploy Keys section, you can configure your Rails
# app to use this deployment recipe by doing the following:
@OkayDave
OkayDave / gist:3883129
Created October 13, 2012 03:33
Errors from running cap deploy:migrations
localhost:r12 davek$ cap deploy:migrations
* executing `deploy:migrations'
* executing `deploy:update_code'
executing locally: "git ls-remote git@github.com:railsrumble/r12-team-278.git master"
command finished in 2554ms
* executing "git clone -q git@github.com:railsrumble/r12-team-278.git /var/www/apps/railsrumble/releases/20121013033023 && cd /var/www/apps/railsrumble/releases/20121013033023 && git checkout -q -b deploy 9957a245a7c58f7b10cbd2d7d06e5498d9079f8b && (echo 9957a245a7c58f7b10cbd2d7d06e5498d9079f8b > /var/www/apps/railsrumble/releases/20121013033023/REVISION)"
servers: ["dallas306.linode.com"]
[r12-team-278@dallas306.linode.com] executing command
** [dallas306.linode.com :: out] Unknown command 'sh -c 'git clone -q git@github.com:railsrumble/r12-team-278.git /var/www/apps/railsrumble/releases/20121013033023 && cd /var/www/apps/railsrumble/releases/20121013033023 && git checkout -q -b deploy 9957a245a7c58f7b10cbd2d7d06e5498d9079f8b && (echo 9957a245a7c58f7b10cbd2d7d06e5498d9