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 / spring.MD
Last active November 20, 2017 13:04
spring-boot-tips

Spring Boot your Hello World app will not "start"

add this to dependencies

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-web</artifactId>
</dependency>
@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
@sonemaro
sonemaro / winroute.py
Created November 29, 2015 22:41
A simple class for working with Windows routes
import subprocess
class RouteEntity(object):
def __init__(self, data):
self.data = data
@property
def destination(self):
return self.data[0]
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