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 / cloud9_ide
Last active May 16, 2022 12:26
make cloud9 IDE a native mac app
npm install nativefier -g
curl -sL https://github.com/c9/core/raw/master/build/osx/c9.icns > c9.icns
nativefier --app-name "Cloud9 IDE" --icon c9.icns --conceal --overwrite https://ide.c9.io/[user-name]/[workspace-name]
@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 / gist:dbecd23215a6be215e71edb19337f341
Last active January 24, 2020 22:15
basic key/value object loop pattern
json.forEach(function(val){
var keys = Object.keys(val);
console.log(keys)
html += "<div class='cat'>"
keys.forEach(function(key) {
html += "<strong>" + key + "</strong>: " +val[key]+ "<br>";
});
html += "</div><br>"
})
@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:

// For Visual Studio Code
// Add code below to ~/.zshrc or ~/.bashrc file
// for clicking the red box and bringing up file in question in vscode
export PATH=$PATH:/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin
export REACT_EDITOR=code
// https://stackoverflow.com/questions/30093997/how-to-edit-react-native-tools