Skip to content

Instantly share code, notes, and snippets.

View luanngominh's full-sized avatar

Luan Ngo Minh luanngominh

View GitHub Profile
@minhtt159
minhtt159 / lsb.py
Created November 5, 2018 10:32
LSB - SVATTT
from PIL import Image
def main():
img = Image.open("for1.png")
pixels = img.load()
h = img.size[0]
w = img.size[1]
out1 = ''
for row in range(h):
for col in range(w):
@streslab
streslab / Headless_Ethereum_Ubuntu_16.04.md
Last active April 4, 2022 23:45
Headless NVIDIA overclock setup under Ubuntu Server 16.04 for ethereum mining

Headless Ethereum Miner Setup - NVIDIA

Reed Slaby, March 2018

Having grown tired of wasting a perfectly good monitor on my ethereum mining rig, I finally decided to replace the Ubuntu Desktop 16.04 installation with Ubuntu Server 16.04. Many of the gtutorials available at the time of this writing range from unecessarily complicated to flat-out wrong. This guide is intended to address many of those shortfalls.

Prerequisites

To complete this guide, you should already have:

  • Basic knowledge of Linux
  • An Ethereum wallet
@hjheath
hjheath / .travis.yml
Created March 2, 2017 13:09
Automatic travis surge deployment
language: python
python:
- "3.5"
install:
- npm install
- pip install requests
before_script:
- npm install -g gulp
script: gulp
after_success:
@chrismdp
chrismdp / s3.sh
Last active July 23, 2024 16:47
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@denji
denji / golang-tls.md
Last active July 30, 2024 07:43 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@shibukawa
shibukawa / concurrent.go
Last active November 19, 2018 16:02
golang threadpool
package main
import (
"sync"
"runtime"
"time"
)
type JobFunc func(int, interface{}, chan interface{})
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active July 31, 2024 12:52
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'