Skip to content

Instantly share code, notes, and snippets.

@mpalpha
mpalpha / _mixins.scss
Created June 24, 2013 17:19
bootstrap 2 sass grid mixin namespaced override
@import "twitter/css/_mixins";
// GRID
// --------------------------------------------------
// The Grid
@mixin grid-core($gridColumnWidth, $gridGutterWidth, $ns:'') {
.#{$ns}row {
margin-left: $gridGutterWidth * -1;
@include clearfix();
}
@mpalpha
mpalpha / osx_npm_global_without_sudo.txt
Last active August 29, 2015 14:22
How to use npm global without sudo on OSX
Taken from http://www.johnpapa.net/how-to-use-npm-global-without-sudo-on-osx/
in terminal:
(if you already have homebrew installed skip to step 2)
1) ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2) brew install node --without-npm
3) mkdir "${HOME}/.npm-packages"
4) echo NPM_PACKAGES="${HOME}/.npm-packages" >> ${HOME}/.bashrc
@mpalpha
mpalpha / generate_ssh_key_osx.txt
Created June 11, 2015 19:43
generate ssh key on osx
in terminal:
go to the home directory
1) cd ~/
create ssh directory
2) mkdir .ssh
go to the .ssh directory
3) cd .ssh
@mpalpha
mpalpha / sshmac.sh
Last active April 7, 2021 18:16
ssh key generator for osx (passphrase is your current user name)
# make executable with 'chmod a+x sshmac.sh' if needed
if [ "$(uname)" == "Darwin" ]; then
# Generate ssh key for Mac OS X platform
cd ~/
mkdir .ssh
cd .ssh
ssh-keygen -t rsa -N "$(id -u -n)" -f id_rsa
ssh-add ~/.ssh/id_rsa
sleep 0.05m
pbcopy < ~/.ssh/id_rsa.pub
@mpalpha
mpalpha / node_mac.sh
Last active February 2, 2022 00:58
Use npm global without sudo on OSX
#!/bin/bash
#
# Install or Update Homebrew as needed
#
which -s brew
if [[ $? != 0 ]] ; then
# Install Homebrew
# https://github.com/mxcl/homebrew/wiki/installation
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@mpalpha
mpalpha / node_git.sh
Created June 24, 2015 15:47
install global node with git on osx
(cd $HOME && git clone git://github.com/ry/node.git)
printf "\n"
printf "\r\nNode: Installing..."
(cd node && ./configure && make && sudo make install) > /dev/null 2>&1
sudo chown -R "$USER" /usr/local/{share/man,bin,lib/node,include/node} > /dev/null 2>&1
npm update npm -g
node -v && npm -v
//Function that converts a base10 number to base16 number.
//This is needed to convert an index from a list to the appropriate hex value for unicode values.
@function decToHex($dec, $length) {
$hexVals: "A", "B", "C", "D", "E", "F";
$base: 16;
$q: $dec;
$result: "";
@while $q != 0 {
$mod: $q % $base;
$q: floor($q / $base);
@mpalpha
mpalpha / _trumps.spacing-responsive.scss
Last active August 29, 2015 14:26
this spacing-responsive module is a set of custom breakpoint-based classes for nudging margins and paddings around responsively. I've used zurb's Foundation for the breakpoint variables. Its based on https://github.com/inuitcss/trumps.spacing-responsive
/*------------------------------------*\
#SPACING-RESPONSIVE
\*------------------------------------*/
/**
* Margin and padding helper classes. Use these to tweak layout on a micro
* level.
*
* `.(m|p)(t|r|b|l|h|v)(-|+|0) {}` = margin/padding top/right/bottom/left/horizontal/vertical less/more/none
* @extend %ui-m- (1/2 baseline unit 0.5rem)
@mpalpha
mpalpha / my_atom_plugins.txt
Created January 21, 2016 20:47
My Atom Plugins
angularjs
atom-beautify
atom-monokai
atom-runner
autocomplete-html-entities
autocomplete-modules
autocomplete-paths
bottom-dock
color-picker
editorconfig
@mpalpha
mpalpha / Vagrantfile
Last active May 12, 2018 17:44
modern-ie vagrant config: 1. install virtualbox and vagrant, 2. run "vagrant up edge-Win10" or another version as listed below.
# -*- mode: ruby -*-
# vi: set ft=ruby :
=begin
ModernIE VMs
edge-Win10
IE11-Win7
IE11-Win8.1
IE10-Win7
IE10-Win8