Skip to content

Instantly share code, notes, and snippets.

View cointilt's full-sized avatar
🍣
West Coast Keto!

Will Ayers cointilt

🍣
West Coast Keto!
View GitHub Profile
@cointilt
cointilt / gist:2588030
Created May 3, 2012 18:44
Default Gitconfig
[alias]
a = add .
s = status
p = push
c = checkout
po = push origin
@cointilt
cointilt / click.m
Created May 4, 2012 20:08
click.ME
// File:
// click.m
//
// Compile with:
// gcc -o click click.m -framework ApplicationServices -framework Foundation
//
// Usage:
// ./click -x pixels -y pixels
// At the given coordinates it will click and release.
@cointilt
cointilt / gist:2597478
Created May 4, 2012 20:23
Enable screen sharing
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users admin -privs -all -restart -agent -menu
@cointilt
cointilt / log.Wrapper.js
Created June 4, 2012 16:01
Log Wrapper
window.log = function(){
log.history = log.history || []; // store logs to an array for reference
log.history.push(arguments);
if(this.console){
console.log( Array.prototype.slice.call(arguments) );
}
};
(function ($, document) {
$(document).ready(function () {
// Assign some vars to help cache the dom
var holder = $('.toggle-reveal');
// Hide divs if javascript is enabled
holder.find('.revealed').hide();
// On click for links
// Check existence
function exists(thing) {
return (typeof thing !== 'undefined' && thing !== null) ? thing : undefined;
}
/*
Usage...
var options = {
latitude: 0,
@cointilt
cointilt / git_commands
Created April 19, 2013 22:27
Git Commands - Because I always forget them
## Change the message in your last commit
git commit --amend -m "New commit message"
@cointilt
cointilt / font_stacks
Created May 29, 2013 19:57
Font stacks based on system fonts
Font stacks based on system fonts
---------------------------------
Times New Roman stack
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
Georgia stack:
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, Palatino, Palatino Linotype, Times, Times New Roman, serif;
Garamond stack
@cointilt
cointilt / gist:5681163
Created May 30, 2013 20:55
Loop through slides and delay animation
// previous code condenced to make sense of code
this.slides = $('.slides');
// loop through each slide with a delay to slide in
_.each(this.slides, function (v, k) {
// slide in slide
$(this.slides[k]).delay(200 * k).animate({
top: '0px',
opacity: 1
}, 800);
@cointilt
cointilt / color_brightness.php
Last active December 21, 2015 21:58
Color Brightness
<?php
function color_brightness($hex, $percent) {
// Work out if hash given
$hash = '';
if (stristr($hex,'#')) {
$hex = str_replace('#','',$hex);
$hash = '#';
}