This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/ed25519" | |
"crypto/rand" | |
"crypto/sha512" | |
"encoding/hex" | |
"fmt" | |
"math/big" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /pair-setup RTSP/1.0 | |
Content-Length: 32 | |
Content-Type: application/octet-stream | |
CSeq: 0 | |
DACP-ID: 5E094CBFFD22A7E |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. https://github.com/grocer/grocer | |
2. `openssl pkcs12 -in apns-export-cert.p12 -out cert.pem -nodes -clcerts` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} |
NewerOlder