Skip to content

Instantly share code, notes, and snippets.

@cooperwfloyd
cooperwfloyd / index.md
Last active July 29, 2023 19:24
My nvm (Node Version Manager) Config for MacOS Ventura

My nvm (Node Version Manager) Config for MacOS Ventura

Install

Open up a new Terminal and run the following to install nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
@callumlocke
callumlocke / .zshrc
Last active September 20, 2024 13:36
ZSH function to auto-switch to correct Node version
####
# ZSH function to auto-switch to correct Node version
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5
#
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does.
#
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING.
#
# - Works correctly if your .nvmrc file contains something relaxed/generic,
# like "4" or "v12.0" or "stable".
@rosswd
rosswd / multi-git-win.md
Last active September 8, 2024 01:51
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)
@peschee
peschee / sass-responsive-mixin.scss
Last active February 3, 2022 16:14
SASS responsive mixin (bootstrap breakpoints)
/**
* Responsive mixin. The media breakpoints are as defined
* in the twitter bootstrap framework:
*
* - phone
* - tablet-portrait
* - tablet-landscape-desktop
* - large-desktop
*
* Additional parameters for tagetting retina and non-retina
@colindean
colindean / vagrant-scp.sh
Last active November 21, 2023 03:27
A quick way to transfer a file to the home directory on a Vagrant VM
#!/bin/sh
OPTIONS=`vagrant ssh-config | awk -v ORS=' ' '{print "-o " $1 "=" $2}'`
scp ${OPTIONS} "$@" || echo "Transfer failed. Did you use 'default:' as the target?"
@0xjjpa
0xjjpa / install.md
Created October 21, 2012 01:33 — forked from svnlto/install.md
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, nvm

Setup new Mac with OSX Lion from scratch

Latest update 20-Oct-2012. me@jjperezaguinaga.com

Command Line Tools are required for Homebrew. Previously it was suggested to download Xcode 4, but since the new version doesn't ship the proper gcc compiler for rvm, the command line tools are a better option and then using homebrew to get the gcc compiler. If preferred, install Xcode 4, although this setup doesn't follow that set of instructions.

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.

@marcedwards
marcedwards / high-dpi-media.css
Last active November 19, 2023 12:56
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
@pixelhandler
pixelhandler / bootstrap.js
Created February 26, 2012 02:12
Product API example using Backbone.js Models, Views and Collections
// bootstrap
PX.app = new PX.App();
Backbone.history.start();
@mathiasbynens
mathiasbynens / hide-jimmy-wales.user.js
Created November 21, 2011 19:43
Userscript that hides Jimmy Wales on Wikipedia
// ==UserScript==
// @name Hide Jimmy Wales.
// @match http://*.wikipedia.org/*
// ==/UserScript==
(function() {
var banner = document.getElementById('siteNotice');
banner && banner.style.display = 'none';
}());
jQuery.placeholder = function() {
$('[placeholder]').focus(function() {
var input = $(this);
if (input.hasClass('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
if (input.val() === '') {