Skip to content

Instantly share code, notes, and snippets.

View GeordieP's full-sized avatar

Geordie Powers GeordieP

  • 🇨🇦 Toronto
  • 21:02 (UTC -04:00)
View GitHub Profile
Scoot 08/02/2018
On the darkside, I just spent 60 dollars USD to fill up my tank
REAL BITTERSWEET
hurray full tank
Blizik 08/02/2018
that's a lot of dollars
Scoot 08/02/2018
but like
@GeordieP
GeordieP / js-object-destructuring.js
Created August 4, 2018 16:44
Helpful rules and examples for object destructuring assignment in JavaScript
/*
Geordie P. (github/GeordieP)
Find proper documentation on MDN:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
Some general destructuring rules
Gist viewers: Feel free to leave a comment suggesting more, or corrections/improvements to these!
---------------------------------
- if the right side of a colon is an identifier, the identifier is brought into scope (an alias) and refers to the object on the left side. (eg. see a2)
@GeordieP
GeordieP / .vimrc
Created July 18, 2018 17:42
Oni configuration
"==========================
" visuals
"==========================
set title
set titleold="Terminal"
set titlestring=%F
set guioptions=egmrti
set gcr=a:blinkon0
set scrolloff=5
set laststatus=2
/* ------------------------------------------------------------------
1: set module.exports to an object literal
------------------------------------------------------------------ */
module.exports = {
someField: 123,
someFn: function(a) {
console.log(a)
}
}
@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
/*---
* TITLE BAR
---*/
/* title bar */
.chat>.title-wrap {
min-height: 0px;
}
/* window control buttons */
.win-buttons {
@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
#!/usr/bin/python
import json
import urllib.request
class Main:
def __init__(self):
num = 0;
# Output File Formatting Strings
@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>'
#!/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'