Skip to content

Instantly share code, notes, and snippets.

View keoshi's full-sized avatar
🙌
What's up?

Filipe Varela keoshi

🙌
What's up?
View GitHub Profile
@keoshi
keoshi / CSSCmdEnter.sublime-keymap
Created May 18, 2012 15:56 — forked from ttscoff/CSSCmdEnter.sublime-keymap
TextMate CSS {...} on Cmd-Enter for Sublime Text 2
[
{ "keys": ["super+enter"], "command": "insert_snippet", "args": {"contents": " {\n\t$0\n}"}, "context":
[
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }
]
}
]
@keoshi
keoshi / killall coreaudiod
Created January 19, 2014 16:09
killall Mac audio to select Apple TV
sudo killall coreaudiod
@keoshi
keoshi / gmaps.js
Created March 30, 2016 20:10
Selecting Google Maps markers programatically
/*
* At first sight, it might seem impossible to target markers on Google Maps because of recent changes Google made to optimize them.
*
* In this example its shown how to populate your map with custom markers that have a dynamic (yet fake) ID appended to their `src` which, when used with the `optimized: false`, creates a unique DOM element, that you can then target with jQuery.
*
*/
var marker, i;
var locations = [['Seattle','United States',47.6062095,-122.3320708,'01'],['San Jose','United States',37.3382082,-121.8863286,'02'],['Los Angeles','United States',34.0522342,-118.2436849,'03'],['Dallas','United States',32.7766642,-96.7969878,'04'],['San Antonio','United States',29.4241219,-98.4936282,'05'],['Chicago','United States',41.8781136,-87.629798,'06'],['Washington DC','United States',38.9071923,-77.0368707,'07'],['Newark','United States',40.735657,-74.1723667,'08'],['Miami','United States',25.7616798,-80.1917902,'09'],['Sao Paulo','Brazil',-23.5505199,-46.6333094,'10'],['London','United Kingdom',51.
@keoshi
keoshi / separateValues.js
Last active January 13, 2017 13:51
Neatly separate multiple values
var altNames = "cena cena3;cena2; cena4 ;cena5; ;;cena6.cena7";
// 1. Split with space, dot or semicolon
// 2. Filter out empty values
var debug = altNames.split(/[ .;]+/).filter(Boolean);
console.log( debug );
@keoshi
keoshi / _typography.scss
Last active January 13, 2017 13:52
System Fonts in CSS/SASS/SCSS
$font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif;
@keoshi
keoshi / gist:8d479eaba63af5847bcf8cef76a94ed5
Created May 25, 2017 13:03
Webcam stopped working on a Mac?
sudo killall VDCAssistant
@keoshi
keoshi / camphor.scss
Last active December 11, 2017 15:16 — forked from bdno86/camphor.scss
Camphor
$camphor300:'d09GMgABAAAAAQ5UABIAAAAEn0QAAQ3tAAEZmQAAAAAAAAAAAAAAAAAAAAAAAAAAG4SkahzOKgZgFotgAIosCCIJgnMRCAqLlgCKvTwBNgIkA5lwE4GnDguZdAAEIAW7bwcgDHJb0WS0WUXZkokWaBHx4wKbY7TigANIU/t980QCGzI/IkCsdbqJZwY1ZOgWDngIamw3I43435Dd+zJ1kNmKVp/DvXNAwaNm//////////////////+/NZkMZ5cAl0CpbZ3oiwloFA5GyIWNzOYVLt1bpXPX+pABI2fo5rMZpgVYIzYqgxt92ajECqUKh2G9gaOCVRC23VSRVypHfbvb7wYcwEM25WArF0esm1yKzDixrJRdcBGtcpBZTFbFbIl8LIU4gWOnEdSITqkoGrHWJ8ywn9eVFWWk3lC6m07qp1TXntHaWp6ekYHLrFoyzOXYiQnn2kWX2zqMaFBTca25vHKndPhJV66HRhQzL9lB3OT20KGTXuFHu62wm1qzoV/iTnaiLdc8o/D7B+1O94BrjSE3cia6U1A5XNp0kHmUj8IMBaeiGaiNJV7b1csb0bq8EWYo2h1TuipR+7hmYjxeZsonGLNcmgsKp5EUDCEj9SvRyxX2uMUNfINmfNqglBYNNtjtNmdwWV2ly4uQKheyDyka2RTRoQ3IEfs+0BNcGJ4Z5AnmHNpFbCKW5PsXkAzJ6VVzzVMo0fwIUpQQT67itTNRE946/NxDashl9KuAFUbZ6yW91vObh+WAMZ1mQ1J4wotF6KXHuo65X6wSz406hW/T6XZMf/6W+HGYUxCDfhyjPaoMGcWccmbYM/H35NdHTOd79Jg0ho/BDBvRy2vcg8pHsv07UYiKrDFeqzL0Qk7qCkXLuukl2EKuR3xS6VtsLEaT0BfWoDYoQ1YvEjjT729XNMYoCX3j+2ApedBG/UHLOJ7AAnfPSqdmmePsY+522MpfPaf7kf6fIJMn0/4SE6PmuI3yjyeGjWn+1qj/ukf09DE
@keoshi
keoshi / alfred-yourls.php
Created March 21, 2018 21:38
Alfred workflow script for getting shortened URL from Yourls API
<?php
// Costumize your params here
$domain = 'CHANGE_ME';
$token = 'CHANGE_ME';
// Don't change anything below this line
$timestamp = time();
$signature = md5( $timestamp . $token );
@keoshi
keoshi / functions.php
Created December 4, 2018 15:32
Dequeue and deregister Facebook embed from Jetpack site
function keoshi_dequeue_facebook_embed() {
wp_dequeue_script( 'jetpack-facebook-embed' );
wp_deregister_script( 'jetpack-facebook-embed');
}
add_action( 'wp_enqueue_scripts', 'keoshi_dequeue_facebook_embed', 100 );
@keoshi
keoshi / #day
Created April 29, 2020 09:31
Alfred snippet: new day
# {date +0d:EEEE}
### {date}
{cursor}
---