Skip to content

Instantly share code, notes, and snippets.

View themightychris's full-sized avatar

Chris Alfano themightychris

View GitHub Profile
@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 / EMERGENCE-MONITORING.md
Last active May 29, 2021 09:31
emergence monitoring

Monitor emergence services with goaccess and netdata

@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"
},
{
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 / TECHNO-REBELS.md
Last active February 17, 2022 16:35
Alvin Toffler's description of techno-rebels from the 1980 book The Third Wave

The Techno-Rebels

The magnitude of such an advance—its importance for the future of evolution itself—makes it critically necessary that we begin to guide it. To adopt a hands-off, damn-the-torpedoes approach could spell doom for ourselves and our children. For the power, scale, and speed of the change is like nothing before in history, and our minds are still fresh with news of the near-catastrophe at Three Mile Island, the tragic DC-10 crashes, the hard-to-plug massive oil spill off the Mexican coast, and a hundred other technological horrors. Faced with such disasters, can we permit the development and combination of tomorrow’s even more powerful technologies to be controlled by the same shortsighted and selfish criteria used during the Second Wave era?

The basic questions asked of new technologies during the past three hundred years, in both capitalist and socialist nations, have been simple: do they contribute to economic gain or military clout? These twin criteria are clearly no longer adequate. New

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:

<?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);
[
{
"name":"Cheesecake Factory",
"cuisine":"American",
"id":1
},
{
"name":"Shokolaat",
"cuisine":"American",
"id":2
@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
@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++) {