Skip to content

Instantly share code, notes, and snippets.

View niksumeiko's full-sized avatar

Nik Sumeiko niksumeiko

View GitHub Profile
@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
@ecerulm
ecerulm / fix_disqus_urls.rb
Created August 16, 2010 22:46
fix urls and title in Disqus (after developer=1 misuse)
#!/usr/bin/env ruby
# After setting disqus_developer = 1 http://disqus.com/docs/embed/
# I got a lot of threads "corrupted".
# 1. Some of them had the wrong url, http://localhost:4000/xxxxxx.
# 2. Some of them had title == url.
# This script fixes both
# Replace http://localhost:4000 with http://rubenlaguna.com
# Disqus ruby api http://disqus.rubyforge.org/. Relays on my own fix to
# disqus ruby http://github.com/ecerulm/disqus/commit/91d5810c5fc6676f828a4fe17768e0e04b526bbe