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 | |
# usage: push-gh-pages DIRECTORY # DIRECTORY is where GitHub pages contents are in (eg. build) | |
# LICENSE: Public Domain | |
set -e | |
remote=$(git config remote.origin.url) | |
described_rev=$(git rev-parse HEAD | git name-rev --stdin) |
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
# Install dependencies | |
# | |
# * checkinstall: package the .deb | |
# * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
mkdir -p ~/sources/ && \ | |
# Compile against OpenSSL to enable NPN |
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
Photos = {} | |
class Photos.App | |
constructor: -> | |
@gui = new Photos.Gui($("#photos-list")) | |
@backend = new Photos.Backend() | |
start: => | |
@backend.fetchPhotos() | |
.done( |
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
<?php | |
/** | |
* Plugin Name: WP REST API Strict Mode | |
* Description: Triggers an error when unregistered parameters are used. | |
* Author: Ryan McCue | |
* Author URI: http://rmccue.io/ | |
* Version: 0.1 | |
* | |
* Requires https://core.trac.wordpress.org/ticket/35507 | |
*/ |
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
# Modified from: | |
# http://findingscience.com/ruby/ssl/2013/01/13/reading-an-ssl-cert-in-ruby.html | |
require "socket" | |
require "openssl" | |
host = "www.piranhas.co" | |
tcp_client = TCPSocket.new("www.piranhas.co", 443) | |
ssl_client = OpenSSL::SSL::SSLSocket.new(tcp_client) |
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
# import config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
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
// | |
// Companion code to https://medium.com/statuscode/pipeline-patterns-in-go-a37bb3a7e61d | |
// | |
// To run: | |
// go get github.com/pkg/errors | |
// go run -race pipeline_demo.go | |
// | |
package main |
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
* Shows a message while asserting like: | |
ok: [host] => { | |
"msg": "disk usage 4.2B of total 20.0GB (21.0%) (should exceed limit 90.0%)" | |
} | |
* Note this only looks at first mount point on current node | |
* Fails if disk is near-full | |
* Last step pushes to a push-based monitoring service, which will alert us if it doesn't get there after some time | |
* Need to setup a variable `disk_limit`, which is the max acceptable usage ratio, e.g. set it to 0.8 if you want to keep disks within 80% of max size |
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
name: Deploy | |
on: [push] | |
jobs: | |
deploy_staging: | |
name: deploy to staging | |
runs-on: ubuntu-latest | |
container: | |
image: itinerisltd/tiller:latest |
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
<?php | |
/** | |
* composer require sentry/sentry-sdk | |
*/ | |
use Sentry; | |
Env::init(); | |
// Bedrock application config... |
OlderNewer