Skip to content

Instantly share code, notes, and snippets.

View thosuperman's full-sized avatar

Tho Nguyen thosuperman

View GitHub Profile
@thosuperman
thosuperman / GoDaddySSLHAProxy.md
Last active January 19, 2018 06:34 — forked from sethwebster/GoDaddySSLHAProxy.md
Creating a PEM for HaProxy from GoDaddy SSL Certificate

GoDaddy SSL Certificates PEM Creation for HaProxy (Ubuntu 14.04)

1 Acquire your SSL Certificate

Generate your CSR This generates a unique private key, skip this if you already have one.

sudo openssl genrsa -out  etc/ssl/yourdomain.com/yourdomain.com.key 1024

Next generate your CSR (Certificate Signing Request), required by GoDaddy:

@thosuperman
thosuperman / selenium.sh
Last active September 26, 2017 07:48 — forked from dhensby/selenium.sh
Selenium, Firefox and Behat on CentOS 7 RHEL 7 and fedora
#!/usr/bin/env bash
# help from:
# https://gist.github.com/textarcana/5855427
# http://tecadmin.net/install-firefox-on-linux/
# install deps
yum install -y java Xvfb firefox
# This version of FF doesn't actually work with latest selenium (for me) so I remove it again
@thosuperman
thosuperman / stable_ico.sol
Created September 13, 2017 09:48 — forked from stableproject/stable_ico.sol
STABLE Project ICO
pragma solidity ^0.4.11;
/// @title STABLE Project ICO
/// @author Konrad Szałapak <konrad.szalapak@gmail.com>
/*
* Ownable
*
* Base contract with an owner.
* Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner.
@thosuperman
thosuperman / Compile_Bitcoin_on_Ubuntu_14_04
Last active September 13, 2017 03:12 — forked from kostaz/Compile_Bitcoin_on_Ubuntu_14_04
Compile Bitcoin on Ubuntu 14.04
Assuming the username of the Ubuntu user is "ubuntu".
Preparation
-----------
```
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
@thosuperman
thosuperman / readme.md
Created September 4, 2017 08:05 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@thosuperman
thosuperman / ConvertUTF-8.py
Created August 24, 2017 03:33 — forked from smccutchen/ConvertUTF-8.py
Convert multiple files to UTF-8 encoding with Notepad++
# 2016-2017 Soverance Studios.
# Scott McCutchen
# This file will search all files and folders within a given directory, and use Notepad++ to convert their encoding to UTF-8 without Byte Order Marks
#
# This file must be run using the PythonScript plugin from within Notepad++, which is available through the Notepad++ Plugin Manager
#
# You must have Python 2.7 installed
#
# Additionally, this script can only exist and be run from within the Notepad++ user's working directory, the default of which is here:
@thosuperman
thosuperman / add-new-crypto-to-peatio.md
Created August 15, 2017 11:36 — forked from brossi/add-new-crypto-to-peatio.md
Adding A New Cryptocurrency to Peatio

State: Draft
Based on the Peatio Stable branch


Coin Daemon

To the coin daemon's {coin}.conf file, include the -walletnotify command:

# Notify when receiving coins
@thosuperman
thosuperman / gist:7f234135991782cb689b2f15dbd96cc0
Created March 25, 2017 18:27 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@thosuperman
thosuperman / usefull-validation.js
Created October 7, 2016 07:50 — forked from ulinkwo/usefull-validation.js
Some Usefull Validations
//validate string length
function ValidLen(s,min,max){
if (s.length < min || s.length > max) { return false; }
return true;
}
// validate email
function ValidEmail(s){
var check = /^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$/;
if (!check.test(s)) { return false; }
@thosuperman
thosuperman / gist:4cb9fdeca0637c5cd591abd646df7977
Created September 7, 2016 09:21 — forked from zhannes/gist:3207394
Git rebase workflow
# first, fetch the latest refs for all branches. And be sure we have latest master, etc
git checkout master
git fetch
# If any changes from remote, catch our local version up
git rebase origin/master
# could also be done as