Skip to content

Instantly share code, notes, and snippets.

View lemonlatte's full-sized avatar

Jim Yeh lemonlatte

  • Taipei, Taiwan
  • 08:48 (UTC +08:00)
View GitHub Profile
let image = event.target.files[0]
let imgData = new FormData();
imgData.append('file', image, image.name);
const config = {
headers: {
'content-type': 'multipart/form-data'
}
}
event.target.value = ""
@lemonlatte
lemonlatte / keybase.md
Created October 7, 2017 15:59
keybase.md

Keybase proof

I hereby claim:

  • I am lemonlatte on github.
  • I am lemonlatte (https://keybase.io/lemonlatte) on keybase.
  • I have a public key ASBypZFmZzWl-QZQBkryvH_AIme3QhM-Zq9G-3W_WaxAogo

To claim this, I am signing this object:

@lemonlatte
lemonlatte / LICENCE SUBLIME TEXT
Created September 23, 2017 13:03 — forked from RoseySoft/LICENCE SUBLIME TEXT
Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
93F6323C FD7F7544 3F39C318 D95E6480
FCCC7561 8A4A1741 68FA4223 ADCEDE07
function bytes32ToString(bytes32 s) constant returns (string) {
bytes memory bytesString = new bytes(32);
uint charCount = 0;
for (uint j = 0; j < 32; j++) {
byte char = s[j];
if (char != 0) {
bytesString[charCount] = char;
charCount++;
}
}
@lemonlatte
lemonlatte / README.txt
Created July 25, 2017 16:29 — forked from ncw/README.txt
Client side certificates with go
This demonstrates how to make client side certificates with go
First generate the certificates with
./makecert.sh [email protected]
Run the server in one terminal
go run server.go
0x2760869a50d48f1c67253c4461c0a6f9e1440cac
@lemonlatte
lemonlatte / UbuntuMiner
Created June 7, 2017 16:24 — forked from zcshiner/UbuntuMiner
UbuntuMiner. Command list to build an Ubuntu 14.04 Server with Cuda Toolkit 6.5, driver 352.41, and ccminer.
#!/bin/bash
### Command log to install Cuda Toolkit 6.5, driver 343.22, and ccminer.
## Update the system
sudo apt-get update && sudo apt-get -y dist-upgrade
# All the dependencies for Cuda & ccminer (I think)
sudo apt-get -y install gcc g++ build-essential automake linux-headers-$(uname -r) git gawk libcurl4-openssl-dev libjansson-dev xorg libc++-dev libgmp-dev python-dev
@lemonlatte
lemonlatte / litecoin-test.sh
Created May 25, 2017 09:27
Litecoint CommandLine Test
$ litecoin-cli -datadir=$HOME/.config/litecoin getblock e133ae32487cf531fab06bd0c092dc446727e5fcf6a438dcdd4f74dbc6fa2aeb 15:08:09 05/25/2017
{
"hash": "e133ae32487cf531fab06bd0c092dc446727e5fcf6a438dcdd4f74dbc6fa2aeb",
"confirmations": 1,
"strippedsize": 227,
"size": 227,
"weight": 908,
"height": 106,
"version": 536870912,
"versionHex": "20000000",
@lemonlatte
lemonlatte / tls-client.go
Created May 10, 2017 09:31 — forked from michaljemala/tls-client.go
SSL Client Authentication Golang sample
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io/ioutil"
"log"
"net/http"
)

DB

  1. User
{
  "email": "",
  "password": "sha1 hash",
  "privateKey": "",
 "publicKey": "",