Skip to content

Instantly share code, notes, and snippets.

View themightychris's full-sized avatar

Chris Alfano themightychris

View GitHub Profile
@themightychris
themightychris / 0_reuse_code.js
Last active August 29, 2015 14:11
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
<?php
// settings
$slackHook = 'YOUR_SLACK-ISSUED_WEBHOOK_URL_HERE';
$discourseHost = 'YOUR_DISCOURSE_HOSTNAME';
// decode webhook payload
list($post, $topic, $user) = json_decode(file_get_contents('php://input'), true);
@themightychris
themightychris / AN.AbstractAnimation.js
Created February 20, 2012 09:27
Base class for Sencha Animator animations in Sencha Tocuh 2
Ext.define('AN.AbstractAnimation', {
extend: 'Ext.Component'
,config: {
scenes: null
,autoStartScene: 0
,scale: false
,clickEvents: []
,useOrmma: false
}
@themightychris
themightychris / Goto.cs
Created September 23, 2012 19:00 — forked from TryJSIL/Goto.cs
Goto
using System;
public static class Program {
public static void Main (string[] args) {
int i = 0;
a:
i += 1;
Console.WriteLine("a");
for (; i < 16; i++) {

Keybase proof

I hereby claim:

  • I am themightychris on github.
  • I am chrisalfano (https://keybase.io/chrisalfano) on keybase.
  • I have a public key whose fingerprint is 569B 9695 4008 B5A6 4F9E B07C A676 001A 99CA F4BB

To claim this, I am signing this object:

BLACK="\033[01;30m"
MAGENTA="\033[1;31m"
ORANGE="\033[1;33m"
GREEN="\033[1;32m"
PURPLE="\033[1;35m"
WHITE="\033[1;37m"
BOLD=""
RESET="\033[m"
PROMPT_HOSTNAME="$(hostname)"
@themightychris
themightychris / skeletons.json
Created December 5, 2018 17:25
Emergence standard skeletons
[
{
"hostname": "skeleton-v1.emr.ge",
"key": "8U6kydil36bl3vlJ"
},
{
"hostname": "skeleton-v2.emr.ge",
"key": "lKhjNhwXoM8rLbXw"
},
{
@themightychris
themightychris / process.js
Created February 7, 2019 04:39
batch json shell transforms with underscore cli
/*
data.label = "Slate: "+data.label;
data.handle = "slate-"+data.handle;
data.mysql.database = "slate-"+data.mysql.database;
data.mysql.username = "slate-"+data.mysql.username;
data.parent_hostname = data.parent_hostname.replace(/([a-z]a\.slate)/, 'wa-$1');
data.primary_hostname = data.primary_hostname.replace(/([a-z]a\.slate)/, 'wa-$1');
*/
/*
@themightychris
themightychris / README.md
Created February 8, 2019 00:56
File watch notifications with Docker for Windows

A workaround is needed to make file change notification work under Docker for Windows:

# install Python via Chocolatey
choco install python

# install workaround Python script via PIP
pip install docker-windows-volume-watcher

# activate watch mode for all running Docker containers
@themightychris
themightychris / .gitignore
Created February 28, 2019 22:44
habitat studio starter: python / django app
.venv/