Skip to content

Instantly share code, notes, and snippets.

@janeczku
janeczku / notify-slack.sh
Created August 28, 2015 01:15
Slack notifications via Curl
#!/bin/bash
function post_to_slack () {
# format message as a code block ```${msg}```
SLACK_MESSAGE="\`\`\`$1\`\`\`"
SLACK_URL=https://hooks.slack.com/services/your-service-identifier-part-here
case "$2" in
INFO)
SLACK_ICON=':slack:'
@janeczku
janeczku / ocp.php
Last active August 29, 2015 14:12 — forked from ck-on/ocp.php
timezone
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.8 2014-02-25 Added HTTP Basic Auth
0.1.7 2014-02-25 set timezone
@janeczku
janeczku / ocp.php
Last active August 29, 2015 14:12 — forked from kabel/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok, n1xim, pennedav, kabel)
Version: 0.2.0
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.2.0 0000-00-00 Updated page layout/styles and restructure code to be more MVC-like (kabel)
implemented HTTP Basic authentication (pennedav)
@janeczku
janeczku / gist:62198a2ef568bc63f8fe
Last active August 29, 2015 14:21
IPXE boot script for bootstrapping CoreOS on Vultr instances. Works in conjunction with the cloud-config script found here: https://gist.github.com/janeczku/899e96644d315ae0766c
#!ipxe
# This boots the current stable release of CoreOS to ramdisk and applies the cloud-config
# script located at $cloud-config-url.
# All configuration (ssh-key, hostname, etc...) should be done in the cloud-config script.
# See here https://gist.github.com/janeczku/899e96644d315ae0766c
set base-url http://stable.release.core-os.net/amd64-usr/current
kernel ${base-url}/coreos_production_pxe.vmlinuz cloud-config-url=https://gist.githubusercontent.com/janeczku/899e96644d315ae0766c/raw/207637bd78af37b00b072f42b4105cb761fa8018/vultr-coreos-bootstrap.sh
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
@janeczku
janeczku / haproxy-issue-report.md
Last active August 31, 2015 16:54
Haproxy 1.6-dev DNS client issue report
@janeczku
janeczku / resolvers-test.conf
Last active October 19, 2015 19:12
Haproxy 1.6 DNS client issue - Configuration file
global
#stats socket /var/run/admin.sock mode 660 level admin
#stats timeout 30s
defaults
mode http
timeout http-keep-alive 10000
timeout http-request 6s
timeout connect 7s
timeout client 10s
@janeczku
janeczku / deploy.sh
Created November 4, 2015 18:34
Shipyard on armv7 platform
#!/bin/bash
if [ "$1" != "" ] && [ "$1" = "-h" ]; then
echo "Shipyard Deploy uses the following environment variables:"
echo " ACTION: this is the action to use (deploy, upgrade, node, remove)"
echo " DISCOVERY: discovery system used by Swarm (only if using 'node' action)"
echo " IMAGE: this overrides the default Shipyard image"
echo " PREFIX: prefix for container names"
echo " SHIPYARD_ARGS: these are passed to the Shipyard controller container as controller args"
echo " TLS_CERT_PATH: path to certs to enable TLS for Shipyard"
@janeczku
janeczku / m3u8
Created April 13, 2016 14:43
m3u8
#EXTM3U
#EXT-X-MEDIA:TYPE=CLOSED-CAPTIONS,GROUP-ID="cc",NAME="English",LANGUAGE="en",AUTOSELECT=YES,INSTREAM-ID="CC1"
#EXT-X-STREAM-INF:BANDWIDTH=1008000,RESOLUTION=640x360,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS="cc"
https://tvenbc-vh.akamaihd.net/i/prod/video/723/846/160404_3013143_Dateline_04_10_mpx_,1696,1296,896,696,496,306,240,150,64,.mp4.csmil/index_2_av.m3u8?null=0&id=AgCi2lo5uFTzazpZDlcJYe7hlX3F0uV1JEB8txyBqjf1KjsWF2wgbJ73YSBSAZ8radpGZ7HVm1Lrtw%3d%3d
@janeczku
janeczku / rancher-cloud.yaml
Last active June 1, 2016 15:31
Rancher test
#cloud-config
hostname: rancher-1
rancher:
cloud_init:
datasources:
- configdrive:/media/config-2
@janeczku
janeczku / 0_reuse_code.js
Created June 8, 2016 23:34
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console