This Gist MOVED to a public repository: P2P Index
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
ul.tagit { | |
padding: 1px 5px; | |
overflow: auto; | |
margin-left: inherit; /* usually we don't want the regular ul margins. */ | |
margin-right: inherit; | |
} | |
ul.tagit li { | |
display: block; | |
float: left; | |
margin: 2px 5px 2px 0; |
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
var ecdh = crypto.createECDH('secp256k1'); | |
ecdh.generateKeys(); | |
var publicKey = ecdh.getPublicKey(null, 'compressed'); | |
var privateKey = ecdh.getPrivateKey(null, 'compressed'); | |
console.log('Private1:', privateKey.length, privateKey.toString('hex')); | |
console.log('Public1: ', publicKey.length, publicKey.toString('hex')); | |
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
Verifying I am +moshes on my passcard. https://onename.com/moshes |
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
# generate private and public keys | |
ssh-keygen -f ~/.ssh/id_rsa -q -P "" | |
cat ~/.ssh/id_rsa.pub | |
# add some public keys | |
nano ~/.ssh/authorized_keys | |
## install basic packages | |
sudo apt-get -y update | |
sudo apt-get -y install default-jre git ImageMagick |
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
#!/usr/bin/env bash | |
# usage: wget -N https://gist.githubusercontent.com/moshest/e4c73efc8d6a35971f6e/raw/setup-mongodb.sh && sh ./setup-mongodb.sh | |
set -e | |
# configs | |
read -e -p "Replica set name: " -i "rep1" replSet | |
read -e -p "Hostname: " -i $(curl -s http://169.254.169.254/latest/meta-data/public-hostname) hostname | |
read -e -p "Swap size: " -i "8G" swapsize |
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
#!/usr/bin/env bash | |
set -e | |
NODE_ENV=production | |
GIT_HOSTNAME=bitbucket.org | |
GIT_PATH=username/project.git | |
GIT_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY----- | |
... | |
-----END RSA PRIVATE KEY-----" | |
INSTALL_SCRIPT=install.sh |
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
version: 0.0 | |
os: linux | |
files: | |
- source: / | |
destination: /home/ec2-user/node | |
permissions: | |
- object: /home/ec2-user | |
owner: ec2-user | |
group: ec2-user | |
type: |
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
sudo yum install epel-release | |
sudo yum install nginx | |
#mkdir cert && cd ./cert | |
#openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr | |
sudo /etc/init.d/nginx start | |
update-rc.d nginx defaults | |
#nano /etc/nginx/nginx.conf |
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/bash | |
# usage: `curl --silent --location https://gist.githubusercontent.com/moshest/32b19e146bc5e1665708c885e535a631/raw/install.sh | bash -` | |
set -e | |
yum -y update | |
AWS_REGION=`curl http://169.254.169.254/latest/dynamic/instance-identity/document|grep region|awk -F\" '{print $4}'` | |
echo AWS Region: $AWS_REGION | |
# install CodeDeploy |
OlderNewer