Skip to content

Instantly share code, notes, and snippets.

View GeordieP's full-sized avatar

Geordie Powers GeordieP

View GitHub Profile
@GeordieP
GeordieP / gist:5655194
Created May 27, 2013 04:26
Toggle trackpad on Acer C7 ChromeBook running ChrUbuntu
#!/bin/bash
inputID=$(echo $(xinput --list | grep "cyapa" | cut -d'=' -f2) | cut -d\ -f1)
deviceStatus=$(echo $(xinput list-props $inputID | grep "Enabled" | rev) | cut -d\ -f1)
if [ $deviceStatus == 0 ]; then
echo -e "Trackpad is \e[0;31moff\e[0m, enabling..."
xinput set-prop $inputID "Device Enabled" 1
echo -e "Trackpad \e[0;32menabled.\e[0m"
else
@GeordieP
GeordieP / irssi.txt
Last active December 18, 2015 06:08
Very basic irssi tutorial
SETTING UP IRSSI
-> to add a network (change jtvirc to whatever you want, it's what you want the network name to be)
/network add -nick YOUR_TWITCH_NICKNAME jtvirc
-> To add a channel that gets automatically connected to when
- if you don't want to auto connect, take out the -auto
- The jtvirc here should be the same as the network name from above
@GeordieP
GeordieP / BinaryToInt.cpp
Created December 5, 2013 20:14
Part 1 of binary conversion assignment
#include <stdio.h>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main(){
cout << "Enter binary: ";
@GeordieP
GeordieP / BinaryToFloat.cpp
Last active December 30, 2015 09:59
Part 2 of binary conversion assignment
#include <stdio.h>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main(){
cout << "Enter binary: ";
#!/bin/bash
# A script to extract the wallpapers from the Caledonia wallpaper collection
for directory in *; do
cd "$directory"
if [ -d 'content' ]; then
cd 'content'
elif [ -d 'contents' ]; then
cd 'contents'
@GeordieP
GeordieP / DiFmDownloader.py
Last active August 29, 2015 14:04
Reads AAC stream .pls files of all the Di.fm channels, and puts their title and URL into an .XML file that MusicBee's radio station import can read
#!/usr/bin/python
import json
import urllib.request
class Main:
def __init__(self):
# XML Formatting Strings
xmlPre = '<?xml version="1.0" encoding="UTF-8"?><opml version="2.0"><head><title>MusicBee Radio Station List</title><dateCreated>Tue, 29 Jul 2014 13:37:00 GMT</dateCreated></head><body>\n'
xmlPost = '</body></opml>'
#!/usr/bin/python
import json
import urllib.request
class Main:
def __init__(self):
num = 0;
# Output File Formatting Strings
@GeordieP
GeordieP / -TimerManager.cs
Created May 1, 2016 00:06
Performant, flexible, and re-usable timers for Unity3D projects utilizing C# events and delegates
/*
Written by Geordie Powers
https://github.com/GeordieP/
https://gist.github.com/GeordieP/
MIT License
*/
/*
USAGE:
Create a one-shot timer named "myTimer" with duration 3 seconds, and
/*---
* TITLE BAR
---*/
/* title bar */
.chat>.title-wrap {
min-height: 0px;
}
/* window control buttons */
.win-buttons {
@GeordieP
GeordieP / vimrc.vim
Last active March 28, 2018 16:08
gp portable vimrc
"==========================
" visuals
"==========================
set title
set titleold="Terminal"
set titlestring=%F
set guioptions=egmrti
set gcr=a:blinkon0
set scrolloff=5
set laststatus=2