Skip to content

Instantly share code, notes, and snippets.

View sinewalker's full-sized avatar

Michael Lockhart sinewalker

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sinewalker on github.
  • I am sinewalker (https://keybase.io/sinewalker) on keybase.
  • I have a public key whose fingerprint is 8400 93B4 16FE A604 8473 A2F6 3CCA 2E6E BCBE 8795

To claim this, I am signing this object:

@sinewalker
sinewalker / set_window_manager.sh
Created July 5, 2010 02:13
Use Awesome as window manager in KDE
KDEWM=/usr/bin/awesome
@sinewalker
sinewalker / wmname.sh
Created July 5, 2010 02:17
Fix Java grey window problem in Awesome
/usr/bin/wmname LG3D
@sinewalker
sinewalker / MODE
Created July 14, 2010 13:11
Set X11 screen mode using xrandr
#!/bin/bash
###############################################################################
# File: MODE
# Language: Bash
# Time-stamp: <2010-07-14 21:52:07 mjl>
# Platform: X Window System with XRANDR
# OS: Linux
# Authors: Michael Lockhart [MJL]
#
# Rights: Copyright © 2010 Michael James Lockhart, B.App.Comp(HONS)
@sinewalker
sinewalker / edge-csvn.sh
Created April 4, 2011 05:49
A kludge to get Subversion Edge Apache server to run as an LSB service
#! /bin/sh
###############################################################################
#
# File: edge-csvn
# Language: LSB Init Script
# Time-stamp: <2011-04-04 15:46:51 mjl>
# Platform: Unix workstation
# OS: Linux
# Authors: Michael Lockhart [MJL] (sinewalker@gmail.com)
#
@sinewalker
sinewalker / fix_github_https_repo.sh
Created April 26, 2016 06:30 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@sinewalker
sinewalker / RotateDisplay.scpt
Created July 13, 2016 04:02
Applescript to toggle screen rotation. Needs to be tweeked for your specific screen arrangement.
-- this code came from Fancyham - http://fancyham.com/tips/OS_X_toggle_display_rotation_applescript.html
-- Now works with Mountain Lion 10.8
-- Rotate Display on machines
-- This code is offered without any liability implied or explicit.
-- Use it at your own risk.
-- Copyright 2005, 2006 Conrad Albrecht-Buehler
-- Modifications for portrait/landscape only May 2006 Bryan Wu to support toggling between only two modes - landscape and portrait
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
# Forked from the original to do the opposite: Switch ssh repo urls to https
# Original here: https://gist.github.com/m14t/3056747
# Thanks to @m14t
#origin or upstream
REMOTE=${1-origin}
REPO_URL=`git remote -v | grep -m1 "^$REMOTE" | sed -Ene's#.*(git@github.com:[^[:space:]]*).*#\1#p'`
@sinewalker
sinewalker / 0_reuse_code.js
Created September 16, 2016 12: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
@sinewalker
sinewalker / gist:3890869
Created October 15, 2012 04:53
java.vendor id in OpenJDK
[hax]virbuntu$ cat vendor.java
public class vendor {
public static void main(String[] a) {
System.out.println(System.getProperty("java.vendor"));
System.out.println(System.getProperty("java.vendor.url"));
System.out.println(System.getProperty("java.version"));
}
}
[hax]virbuntu$ java -version
java version "1.6.0_24"