Skip to content

Instantly share code, notes, and snippets.

View ryanpcmcquen's full-sized avatar

Ryan McQuen ryanpcmcquen

View GitHub Profile
@ryanpcmcquen
ryanpcmcquen / styles.less
Last active July 9, 2021 01:56 — forked from MattMcFarland/styles.less
Ligature fonts for atom
/*
Thanks to this blog post for the idea:
https://medium.com/@docodemore/an-alternative-to-operator-mono-font-6e5d040e1c7e
This is a modified version of that using `Script12 BT` instead of `flottflott`
and updated for the changes in Atom's selector syntax.
Source:
https://gist.github.com/ryanpcmcquen/f99453c871b4ce393fea5a274eed4cb3
*/
@ryanpcmcquen
ryanpcmcquen / torchlight-sdl-fix.sh
Last active October 8, 2018 05:54 — forked from PVince81/gist:63800bffd437f2175da9
torchlight-sdl-fix
#!/bin/sh
## curl https://gist.githubusercontent.com/ryanpcmcquen/687747c6de09693a6916/raw/torchlight-sdl-fix.sh | sh
# set this to your Torchlight directory
TORCHLIGHTDIR=/usr/local/games/Torchlight
## grab the SDL repo
hg clone http://hg.libsdl.org/SDL
## enter the directory
cd SDL
@ryanpcmcquen
ryanpcmcquen / 0_reuse_code.js
Last active August 29, 2015 14:17
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
@ryanpcmcquen
ryanpcmcquen / ms-extract-umeta-clean.sql
Last active August 29, 2015 14:15 — forked from aprea/ms-extract-umeta-clean.sql
ms-extract-umeta-clean.sql
-- delete any usermeta specific to the other subsites
delete from wp_usermeta where meta_key regexp '^wp_([0-9]+)_';
-- duplicate the wp_usermeta structure in a working data table,
-- but add a unique index for filtering out duplicates
create table _fix_usermeta like wp_usermeta;
alter table _fix_usermeta add unique(user_id, meta_key);
-- copy the site-specific usermeta, keeping only the last of each duplicate
insert into _fix_usermeta
@ryanpcmcquen
ryanpcmcquen / dabblet.css
Created September 6, 2014 02:51 — forked from LeaVerou/dabblet.css
Image slider with pure CSS
/**
* Image slider with pure CSS
* Original version in http://demosthenes.info/blog/css
*/
.image-slider {
position:relative;
display: inline-block;
line-height: 0;
}
@ryanpcmcquen
ryanpcmcquen / dabblet.css
Created September 6, 2014 02:51 — forked from LeaVerou/dabblet.css
Animation on hover (right way)
/**
* Animation on hover (right way)
*/
div {
width: 9em;
padding: .6em 1em;
margin: 2em auto;
background: yellowgreen;
animation: spin 1s linear infinite;
@ryanpcmcquen
ryanpcmcquen / dabblet.css
Created September 6, 2014 02:50 — forked from LeaVerou/dabblet.css
3D cube
/**
* 3D cube
*/
body {
perspective: 600px;
perspective-origin: 300px -90px;
}
.cube, .cube:before, .cube:after,
@ryanpcmcquen
ryanpcmcquen / dabblet.css
Created September 5, 2014 16:23 — forked from chriscoyier/dabblet.css
Ratings Stars
/*
Ratings Stars
(with as little code as possible)
*/
.rating {
unicode-bidi: bidi-override;
direction: rtl;
text-align: center;
}
.rating > span {
@ryanpcmcquen
ryanpcmcquen / ricerocks.py
Last active August 29, 2015 14:00 — forked from csaez/ricerocks.py
ricerocks
# Mini-project #8 - "RiceRocks" (Asteroids)
#
# 'Introduction to Interactive Programming in Python' Course
# RICE University - coursera.org
# by Joe Warren, John Greiner, Stephen Wong, Scott Rixner
import simplegui
import math
import random
#!/bin/bash
#set -o verbose
#set -x
#set -v
#sed -e :a -e '$!N;s/ \n/,/;ta'
#start the file over and erase contents
echo '' > details.csv
#write the column headings