Skip to content

Instantly share code, notes, and snippets.

View amslezak's full-sized avatar

Andy Slezak amslezak

View GitHub Profile
@amslezak
amslezak / 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
@amslezak
amslezak / css_resources.md
Last active August 29, 2015 14:17 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@amslezak
amslezak / fn.workflow - script fix
Created January 16, 2016 01:12
Toggle function (fn) on keyboard with alfred workflow
# snagged from here: http://www.alfredforum.com/topic/1849-toggle-fn-key-behavior/
on alfred_script(q)
tell application "System Preferences"
reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
end tell
tell application "System Events" to tell process "System Preferences"
click checkbox 1 of tab group 1 of window 1
end tell
@amslezak
amslezak / gmail_sidekick_hide.css
Last active January 21, 2016 18:32
Hide Sidekick crap in gmail (with stylebot)
/* Remove Sidekick */
#signals-label > div.UKr6le.aio, div.LrBjie.inboxsdk__navMenu, #signals-label {
display: none;
}
/* Clean up top right bar */
#gb > div.gb_Sd.gb_Me > div.gb_9a.gb_Me.gb_R.gb_Le.gb_T > div.gb_8b.gb_Me.gb_R > div.gb_gc.gb_Vc.gb_R.gb_hc {
display: none;
}
@amslezak
amslezak / lodash_map_filter.js
Created May 25, 2016 02:54
map filter lodash 4 example
var _ = require('lodash');
var users = [
{id: 1, name: "Nelson", roles: ["admin"]},
{id: 5, name: "Mike", roles: ["admin"]},
{id: 2, name: "Andy", roles: ["registered, moderator"]},
{id: 3, name: "Dan", roles: [""]},
{id: 4, name: "Tim", roles: ["moderator"]},
]
@amslezak
amslezak / index.html
Created January 17, 2017 17:09
twitch api (bluebird) working
<a href="#" class='hi' onClick="$('.hidden').removeClass('hidden')">show all</a> / <a href="#" onClick="$('.online').addClass('hidden');$('.offline').removeClass('hidden')">offline</a> / <a href="#" onClick="$('.offline').addClass('hidden');$('.online').removeClass('hidden')">online</a>
<p></p>
<div class="yo"></div>

Keybase proof

I hereby claim:

  • I am amslezak on github.
  • I am aslezak (https://keybase.io/aslezak) on keybase.
  • I have a public key ASC7TfAC5dAZs4dQ2-EfusyR778i493PoTMTIm-4CC_lwwo

To claim this, I am signing this object:

@amslezak
amslezak / for-await-of.js
Last active December 8, 2018 03:06
simple for-await-of snippet/example
// for await of
const fetch = require('node-fetch')
const urls = [
'https://swapi.co/api/people/1',
'https://swapi.co/api/people/2',
'https://swapi.co/api/people/3',
'https://swapi.co/api/people/4',
]
@amslezak
amslezak / docker.md
Last active July 17, 2019 15:23
docker commands (cheat sheet)

Docker Cheat Sheet

delete docker managed volumes, but not bind mounted "volumes".

docker-compose rm -v

npm install -g @cacherapp/cli