Skip to content

Instantly share code, notes, and snippets.

@guyjin
guyjin / classWeatherHTML
Last active August 29, 2015 14:04
class Weather Widget HTML
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>class weather</title>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
.bg {
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
img {
position: absolute;
top: 0;
@guyjin
guyjin / disable bin-links
Created June 3, 2014 05:33
Disable bin-links in NPM on Vagrant VM in Windows
@guyjin
guyjin / NPM_update
Created June 3, 2014 05:26
Update NPM
npm update npm -g
@guyjin
guyjin / Update Node
Created June 3, 2014 05:25
Update Node to latest stable version.
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
@guyjin
guyjin / gist:5486790
Created April 30, 2013 05:43
Mac: ubuntu iso extraction
1. Open the Disk Utility gui application. (Easy way to find it: Search using spotlight.)
2. Drag the original .iso from Finder into the images section of Disk Utility (on the left side underneath the mounted drive list), and then double click on it there. A faded "diskNs1" should appear underneath it, and a dialog box will say the disk is not mountable. The "diskNs1" is the embedded .iso.
3. Run "dd if=/dev/rdiskNs1 of=./ubuntu-extracted.iso bs=1m" to copy out the working .iso image.
@guyjin
guyjin / Mac: ubnuntu iso extraction
Created April 30, 2013 05:42
commands to extract iso image from hybrid Ubuntu iso's on a mac.
1. Open the Disk Utility gui application. (Easy way to find it: Search using spotlight.)
2. Drag the original .iso from Finder into the images section of Disk Utility (on the left side underneath the mounted drive list), and then double click on it there. A faded "diskNs1" should appear underneath it, and a dialog box will say the disk is not mountable. The "diskNs1" is the embedded .iso.
3. Run "dd if=/dev/rdiskNs1 of=./ubuntu-extracted.iso bs=1m" to copy out the working .iso image.
@guyjin
guyjin / Mac: ubnuntu iso extraction
Created April 30, 2013 05:42
commands to extract iso image from hybrid Ubuntu iso's on a mac.
1. Open the Disk Utility gui application. (Easy way to find it: Search using spotlight.)
2. Drag the original .iso from Finder into the images section of Disk Utility (on the left side underneath the mounted drive list), and then double click on it there. A faded "diskNs1" should appear underneath it, and a dialog box will say the disk is not mountable. The "diskNs1" is the embedded .iso.
3. Run "dd if=/dev/rdiskNs1 of=./ubuntu-extracted.iso bs=1m" to copy out the working .iso image.
@guyjin
guyjin / gist:5164968
Created March 14, 2013 20:34
install Subversion 1.7 to CentOS 5 VM
cd /usr/local/src/
wget http://archive.apache.org/dist/subversion/subversion-1.7.0.tar.gz
tar zxf subversion-1.7.0.tar.gz
If download link don’t work get the correct one from http://subversion.apache.org/download/
#Enter extracted source directory and download apache apr and apr-util before compiling subversion
cd /usr/local/src/subversion-1.7.0
wget http://rahulsoni.me/files/apr-util-1.3.12.tar.gz
wget http://rahulsoni.me/files/apr-1.4.5.tar.gz
@guyjin
guyjin / gist:5164966
Created March 14, 2013 20:34
install Subversion 1.7 to CentOS 5 VM
cd /usr/local/src/
wget http://archive.apache.org/dist/subversion/subversion-1.7.0.tar.gz
tar zxf subversion-1.7.0.tar.gz
If download link don’t work get the correct one from http://subversion.apache.org/download/
#Enter extracted source directory and download apache apr and apr-util before compiling subversion
cd /usr/local/src/subversion-1.7.0
wget http://rahulsoni.me/files/apr-util-1.3.12.tar.gz
wget http://rahulsoni.me/files/apr-1.4.5.tar.gz