Skip to content

Instantly share code, notes, and snippets.

View crossle's full-sized avatar
🌐

Crossle Song crossle

🌐
View GitHub Profile
package main
import (
"crypto/ed25519"
"crypto/rand"
"crypto/sha512"
"encoding/hex"
"fmt"
"math/big"
1. Mixin testnet launch
$ ./mixin setuptestnet
$ mixin kernel -dir /tmp/mixin-7001 -port 7001
$ mixin kernel -dir /tmp/mixin-7002 -port 7002
$ mixin kernel -dir /tmp/mixin-7003 -port 7003
$ mixin kernel -dir /tmp/mixin-7004 -port 7004
$ mixin kernel -dir /tmp/mixin-7005 -port 7005
$ mixin kernel -dir /tmp/mixin-7006 -port 7006
package main
import (
"encoding/base64"
"fmt"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth"
CREATE DATABASE database_name;
CREATE USER my_username WITH PASSWORD 'my_password';
GRANT ALL PRIVILEGES ON DATABASE "database_name" to my_username;
psql -U postgres
ALTER TABLE <tablename> OWNER TO <username>
ALTER DATABASE name OWNER TO new_owner;
sudo su - postgres
POST /pair-setup RTSP/1.0
Content-Length: 32
Content-Type: application/octet-stream
CSeq: 0
DACP-ID: 5E094CBFFD22A7E
@crossle
crossle / EXIFdate2photo.sh
Last active February 19, 2017 03:25 — forked from unabridgedxcrpt/EXIFdate2photo.sh
Grab the EXIF date from original date time field and overlay it on a photo with white text with black stroke font.
#!/bin/sh
#Credit: http://dptnt.com/2009/08/add-date-time-stamp-to-jpeg-photos-using-free-software-mac-linux-nix-edition/
# I added:
# 1. formatting the EXIF date to use the month name and remove the seconds from the time display
# 2. outline the text for lighter backgrounds and better contrast in more images.
#Dependencies: imagemagick, exiftool
# Change the font variable to point to your font location
##font="~/Library/Fonts/digital-7 (mono).ttf"
## digital 7 for to make date time like the *olden days*: http://www.dafont.com/digital-7.font
1. https://github.com/grocer/grocer
2. `openssl pkcs12 -in apns-export-cert.p12 -out cert.pem -nodes -clcerts`
1. Install MSYS2 from https://msys2.github.io/
2. Install Mingw-W64 `pacman -S mingw-w64-i686-gcc`
3. Install git autoconf automake libtool make pkg-config
`pacman -S git`
`pacman -S autoconf`
`pacman -S automake`
`pacman -S libtool`
`pacman -S make`
`pacman -S pkg-config`
4. yasm:http://yasm.tortall.net/,change to yasm.exe,move to C:\msys32\usr\bin
@crossle
crossle / windows_openssl
Last active October 8, 2021 08:09
Windows OpenSSL compile
Open VS2015 x86 Native Tools Command Prompt.bat
git clone https://github.com/openssl/openssl.git
cd openssl
git checkout OpenSSL_1_0_1-stable
perl Configure VC-WIN32 --prefix=E:\Build\Libraries\openssl
ms\do_ms
nmake -f ms\nt.mak
nmake -f ms\nt.mak install
#define RANDOM(x) (rand()%x)
#define MAC_ADDR_LENGTH 6
void macGen() {
uint8_t HEXCHAR[256];
uint8_t MACAddr[MAC_ADDR_LENGTH];
for (int j = 0; j < 256; j ++) {
HEXCHAR[j] = j;
}