Skip to content

Instantly share code, notes, and snippets.

View z3t0's full-sized avatar

Rafi Khan z3t0

View GitHub Profile
@z3t0
z3t0 / Portable Node.js andNPM on windows.md
Created February 4, 2017 05:08 — forked from massahud/Portable Node.js andNPM on windows.md
Portable Node.js and NPM on windows
  1. Get node binary (node.exe) from http://nodejs.org/download/
  2. Create the folder where node will reside and move node.exe to it
  3. Download the last zip version of npm from http://nodejs.org/dist/npm
  4. Unpack the zip inside the node folder
  5. Download the last tgz version of npm from http://nodejs.org/dist/npm
  6. Open the tgz file and unpack only the file bin/npm (without extension) directly on the node folder.
  7. Add the the node folder and the packages/bin folder to PATH
  8. On a command prompt execute npm install -g npm to update npm to the latest version

Now you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.

@z3t0
z3t0 / rust-update-docs-hook
Created March 11, 2016 17:12 — forked from Stebalien/rust-update-docs-hook
A post-commit hook to update a rust project's gh-pages.
#!/bin/bash
set -e
[[ "$(git symbolic-ref --short HEAD)" == "master" ]] || exit 0
msg() {
echo "> $@"
}
dir="$(pwd)"
tmp="$(mktemp -d)"
@z3t0
z3t0 / Ethernet.h
Created August 28, 2015 01:12 — forked from trunner10/Ethernet.h
Use web to change Tivo channel
#ifndef ethernet_h
#define ethernet_h
#include <inttypes.h>
//#include "w5100.h"
#include "IPAddress.h"
#include "EthernetClient.h"
#include "EthernetServer.h"
#include "Dhcp.h"
# make 2 partitions on the disk.
parted -s /dev/sda mktable msdos
parted -s /dev/sda mkpart primary 0% 100m
parted -s /dev/sda mkpart primary 100m 100%
# make filesystems
# /boot
mkfs.ext2 /dev/sda1