Skip to content

Instantly share code, notes, and snippets.

@gkrizek
gkrizek / bitcoin-core-irc.ghi.md
Last active January 22, 2019 21:03
Example Bitcoin Core IRC .ghi.yml file

Example Bitcoin Core IRC .ghi.yml file

version: 1
global:
  irc:
    host: chat.freenode.net
    nick: bitcoin-git
pools:
 - name: bitcoin
@gkrizek
gkrizek / printenv-codebuild.md
Last active July 9, 2019 15:54
Example output of running `printenv` inside CodeBuild
CODEBUILD_VPC_AZ=us-west-2b
MAVEN_OPTS=-Dmaven.wagon.httpconnectionManager.maxPerRoute=2
CODEBUILD_LAST_EXIT=0
CODEBUILD_START_TIME=1538752095466
CODEBUILD_BMR_URL=https://CODEBUILD_AGENT:3000
CODEBUILD_SOURCE_VERSION=arn:aws:s3:::bucket/pipeline/App/OGgJCVJ.zip
HOSTNAME=ip-10-10-2-122.us-west-2.compute.internal
CODEBUILD_KMS_KEY_ID=arn:aws:kms:us-west-2:000000011111:alias/aws/s3
CODEBUILD_BUILD_ID=codebuild-project:40b92e01-706b-422a-9305-8bdb16f7c269
@gkrizek
gkrizek / create_release_api.md
Last active September 13, 2018 16:41
For GitHub Support

Request when the git tag already exists but the release name does not

gkrizek$ curl -v -X POST -d '{"tag_name":"v1.0","name":"v9.9.9","body":"Test for GitHub Support"}' -H "Authorization: token e0d9a9axxxxxxxxxxxeea281171c5e04113c" https://api.github.com/repos/gkrizek/pipeline-test/releases
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 192.30.253.117...
* TCP_NODELAY set
* Connected to api.github.com (192.30.253.117) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1

Keybase proof

I hereby claim:

  • I am gkrizek on github.
  • I am gkrizek (https://keybase.io/gkrizek) on keybase.
  • I have a public key ASDUkFNWxpP0z6EOwGG4Jt-Az3TsEFcivFZqAY8tjxZ2tAo

To claim this, I am signing this object:

@gkrizek
gkrizek / meteor-deploy-server.sh
Created June 27, 2016 01:43
Script to deploy a Meteor application. Requires the Client side script as well. See: https://blog.gitrandom.com
#!/bin/bash
###
# Script to Deploy Meteor App to server
# This has a counterpart on the client, which is what calls this script to run
# If you need help with the Cloudflare API, check their docs
###
# create by Graham Krizek on March 28, 2016
###
#
APP_NAME="APPNAME"
#!/bin/bash
###
# Script to Deploy Meteor App to server
# This has a counterpart on the client, which is what calls this script to run
# If you need help with the Cloudflare API, check their docs
###
# create by Graham Krizek on March 28, 2016
###
#
APP_NAME="APPNAME"
@gkrizek
gkrizek / meteor-deploy-client.sh
Created June 27, 2016 01:39
Script to deploy a Meteor application. Requires the Server side script as well. See: https://blog.gitrandom.com
#!/bin/bash
###
# Script to Deploy Meteor App to server
# This has a counterpart on the server, which is called at the end of this script
###
# create by Graham Krizek on March 28, 2016
###
#
echo "Are you deploying to production or staging?"
@gkrizek
gkrizek / meteor-init-script
Created June 27, 2016 01:24
Init script for a Meteor application. See: https://blog.gitrandom.com
#!/bin/bash
#
# Service script for running a bundled Meteor application under Forever.
#
. /etc/init.d/functions
NAME=APPNAME
SOURCE_DIR=/var/www/APPNAME
SOURCE_FILE=main.js
@gkrizek
gkrizek / cloudflare
Created June 27, 2016 01:23
NGINX configuration to get real IP of visitor if site is behind Cloudflare
set_real_ip_from 199.27.128.0/21;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 197.234.240.0/22;
@gkrizek
gkrizek / meteor-nginx.conf
Created June 27, 2016 01:14
NGINX configuration for a Meteor application. See: https://blog.gitrandom.com
server_tokens off;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80 default_server;
server_name example.com;