Skip to content

Instantly share code, notes, and snippets.

View sonemaro's full-sized avatar
🎯
Focusing

Soroush Khosravi sonemaro

🎯
Focusing
View GitHub Profile
@sonemaro
sonemaro / mgoExample.go
Created August 18, 2018 23:58 — forked from border/mgoExample.go
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
@sonemaro
sonemaro / Linux Static IP
Created January 29, 2016 11:35 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
wget https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
bunzip2 phantomjs-1.9.1-linux-x86_64.tar.bz2
tar xf phantomjs-1.9.1-linux-x86_64.tar
mv phantomjs-1.9.1-linux-x86_64/ /opt/
ln -s /opt/phantomjs-1.9.1-linux-x86_64/ /opt/phantomjs
ln -s /opt/phantomjs/bin/phantomjs /usr/local/bin/
#check what you've just done
which phantomjs
phantomjs --version
wget https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
bunzip2 phantomjs-1.9.1-linux-x86_64.tar.bz2
tar xf phantomjs-1.9.1-linux-x86_64.tar
mv phantomjs-1.9.1-linux-x86_64/ /opt/
ln -s /opt/phantomjs-1.9.1-linux-x86_64/ /opt/phantomjs
ln -s /opt/phantomjs/bin/phantomjs /usr/local/bin/
#check what you've just done
which phantomjs
phantomjs --version
cd;
wget http://www.open.com.au/mikem/bcm2835/bcm2835-1.3.tar.gz;
tar xvfz bcm2835-1.3.tar.gz;
cd bcm2835-1.3;
./configure;
make;
sudo make install