Skip to content

Instantly share code, notes, and snippets.

View royge's full-sized avatar
👨‍💻
...

Roy E royge

👨‍💻
...
  • Cebu, Philippines
View GitHub Profile
@royge
royge / ngrok-install.md
Created January 11, 2016 10:22
Expose localhost to the internet with Ngrok

Expose Localhost to the Internet With Ngrok

If you want a way to access your localhost easily on the public internet, lets say, to showcase the current work to a client, etc. This is where ngrok comes in. It allows us to establish a tunnel that forwards a port on our machine and make it available on the internet.

Ngrok is a Go program, distributed as a single executable file for all major desktop platforms. There are no additional frameworks to install or other dependencies.

This tutorial assumes you are using MAMP and have previously set up DNSMASQ.

@royge
royge / print-certs.go
Created January 18, 2016 05:00 — forked from jtwaleson/print-certs.go
Print checksums of certificates public key, entire certificate, subject field, issuer field
package main
import "crypto/sha1"
import "crypto/x509"
import "fmt"
import "encoding/pem"
import "os"
import "time"
import "bufio"
import "strings"
@royge
royge / fetch.go
Created January 18, 2016 05:00 — forked from jtwaleson/fetch.go
Certificate fetcher in Go
package main
import "crypto/tls"
import "crypto/sha1"
import "crypto/x509"
import "fmt"
import "encoding/pem"
import "os"
import "time"
import "bufio"
@royge
royge / Raspberry Pi httpd benchmark.md
Created February 15, 2016 03:23 — forked from msoap/Raspberry Pi httpd benchmark.md
Raspberry Pi httpd benchmark with ab

Raspberry Pi httpd benchmark

Total RPS

                    Nginx: 351.5 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
              Go/fasthttp: 341.9 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
                       Go: 247.2 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

Node.js: 126.0 ■■■■■■■■■■■■■■■■■■■■■■■■■

@royge
royge / TestPayment.py
Created February 17, 2016 11:01 — forked from aydiv/TestPayment.py
Paypal Adaptive Payments - Python sample for parallel payment
import urllib
import urlparse
import collections
import httplib
def TestPayment():
#Set our headers
headers = {
'X-PAYPAL-SECURITY-USERID': 'jb-us-seller_api1.paypal.com',
'X-PAYPAL-SECURITY-PASSWORD': 'WX4WTU3S8MY44S7F',
@royge
royge / bumpversion.sh
Created March 5, 2016 13:36 — forked from pete-otaqui/bumpversion.sh
Bump a software project's VERSION, add the CHANGES, and tag with GIT
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.
@royge
royge / 00-install-on-64-bit-ubuntu-14.04.md
Created March 10, 2016 10:38 — forked from dwayne/00-install-on-64-bit-ubuntu-14.04.md
Installing node and npm on Ubuntu 12.04 LTS and 64-bit Ubuntu 14.04 LTS.
  1. Navigate to http://nodejs.org/download/ and on the Linux Binaries (.tar.gz) row click to download the 64-bit version of the current latest release.

  2. Say you've downloaded node-v0.10.7-linux-x64.tar.gz into the Downloads directory. Then, open the terminal and type the following:

$ cd ~/Downloads
$ mkdir -p ~/local/node
$ tar xzf node-v0.10.7-linux-x64.tar.gz -C ~/local/node --strip-components=1
$ echo '# Node Enviroment Setup' >> ~/.bashrc
$ echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.bashrc
@royge
royge / Dockerfile
Created May 13, 2016 15:17 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
# Example Dockerfile
FROM hello-world
@royge
royge / gitkins-light.go
Created August 15, 2016 03:17 — forked from p4tin/gitkins-light.go
Gitkins Light
package main
import (
"log"
"time"
"net/http"
"encoding/json"
"golang.org/x/oauth2"
"github.com/google/go-github/github"
)
@royge
royge / pps.sh
Created October 24, 2016 08:13 — forked from pavel-odintsov/pps.sh
pps.sh for habrahabr
#!/bin/bash
INTERVAL="1" # update interval in seconds
if [ -z "$1" ]; then
echo
echo usage: $0 [network-interface]
echo
echo e.g. $0 eth0
echo