Skip to content

Instantly share code, notes, and snippets.

View jplew's full-sized avatar

JP Lew jplew

View GitHub Profile
@d2s
d2s / installing-node-with-nvm.md
Last active March 13, 2024 12:09
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
@danielbachhuber
danielbachhuber / gist:6584069
Created September 16, 2013 17:49
Include your logo into the WordPress toolbar You'll likely want to update the path to your logo.
<?php
add_action( 'admin_bar_menu', function( $wp_admin_bar ){
$args = array(
'id' => 'your-logo',
'title' => '<img style="padding-top:5px;" src="' . plugins_url( 'img/your-logo.png', __FILE__ ) . '" />',
);
$wp_admin_bar->add_node( $args );
}, 0 );
add_action( 'admin_bar_menu', function( $wp_admin_bar ){
$wp_admin_bar->remove_node( 'wp-logo' );
@zenkay
zenkay / gist:3237860
Created August 2, 2012 15:19
Installation tips for RVM/Ruby on OSX 10.8 Mountain Lion

Ruby, RVM and Mountain Lion

Key problems

Mountain Lion (10.8) has three main difference compared to Lion (10.7):

  • XCode 4.4 does not install Command Line Tools by default
  • X11 isn't available anymore
  • The installed version of OpenSSL has some bugs

How to work around

@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh