Skip to content

Instantly share code, notes, and snippets.

View goldalworming's full-sized avatar

arief nur andono goldalworming

View GitHub Profile
@goldalworming
goldalworming / check.go
Created April 11, 2016 07:47 — forked from mattes/check.go
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); err == nil {
// path/to/whatever exists
}
@goldalworming
goldalworming / setup_howto.txt
Created March 31, 2016 09:48 — forked from kosiara/setup_howto.txt
Setup Facebook React-native sample (empty) project on Ubuntu
# author:
# @Bartosz Kosarzycki
#
sudo apt-get install npm
sudo npm install -g react-native-cli
sudo ln -s /usr/bin/nodejs /usr/bin/node
cd /home/user/your/project/path
react-native init AwesomeProject
cd AwesomeProject
@goldalworming
goldalworming / client.py
Created March 30, 2016 11:50 — forked from nephics/client.py
Test of experimental Tornado feature for a streaming request body handler
#
# Test of experimental Tornado feature for a streaming request body handler, see
# https://github.com/nephics/tornado/commit/1bd964488926aac9ef6b52170d5bec76b36df8a6
#
#
# Client sending file to server
#
import tornado.httpclient as httpclient
import speech_recognition
import pyttsx
speech_engine = pyttsx.init('sapi5') # see http://pyttsx.readthedocs.org/en/latest/engine.html#pyttsx.init
speech_engine.setProperty('rate', 150)
def speak(text):
speech_engine.say(text)
speech_engine.runAndWait()
@goldalworming
goldalworming / gist:33c2ff310cd99c2fc88b
Created March 7, 2016 09:48 — forked from schmichael/gist:7379338
Transparently compress and upload a file in golang
package main
import (
"bufio"
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
@goldalworming
goldalworming / xls2pdf.py
Created March 4, 2016 04:34 — forked from mprihoda/xls2pdf.py
Convert XLS to PDF using Iron Python and MS Office
import clr
import sys
import os.path
clr.AddReference("Microsoft.Office.Interop.Excel")
from Microsoft.Office.Interop import Excel
from System import Type, GC
# See http://msdn.microsoft.com/en-us/library/bb407651.aspx for
@goldalworming
goldalworming / README.md
Created February 18, 2016 05:19 — forked from mike10004/README.md
Reverse Shell Using Python
@goldalworming
goldalworming / vineScrape.go
Created December 4, 2015 07:19 — forked from cryptix/vineScrape.go
extract a javascript object value from a html page using goquery and otto
package main
import (
"errors"
"log"
"os"
"github.com/PuerkitoBio/goquery"
"github.com/robertkrimen/otto"
)
@goldalworming
goldalworming / md5-example.go
Created November 4, 2015 08:53 — forked from sergiotapia/md5-example.go
Golang - How to hash a string using MD5.
import (
"crypto/md5"
"encoding/hex"
)
func GetMD5Hash(text string) string {
hasher := md5.New()
hasher.Write([]byte(text))
return hex.EncodeToString(hasher.Sum(nil))
}
# You will need to make this file executable (chmod u+x) and run it with sudo
apt-get update
apt-get --fix-missing -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk
mkdir -p /src/erlang
cd /src/erlang
wget http://www.erlang.org/download/otp_src_R15B01.tar.gz
tar -xvzf otp_src_R15B01.tar.gz
chmod -R 777 otp_src_R15B01
cd otp_src_R15B01
./configure