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
# Tested on MacOS save to $HOME/.tmux.conf and restart tmux | |
# Binds, Options | |
unbind C-b | |
set-option -g prefix f9 | |
bind f9 send-prefix | |
setw -g xterm-keys on | |
set-option -sg escape-time 10 | |
set -g mouse on |
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
#!/usr/bin/env tclsh | |
variable tfcount 0 | |
variable Data [dict create] | |
variable resources [dict create] | |
variable current_file "" | |
proc analyze_file {filename} { | |
global current_file data | |
set current_file $filename |
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
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/wait.h> | |
#include <string.h> | |
void capture_output(char * cmd, char ** outstr, int max_lines) | |
{ | |
// we must pass a len 2 array to pipe | |
int pipefds[2]; | |
// fork() returns a process id |
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 | |
# Install: | |
# chmod +x mongo_conn.sh | |
# ./mongo_conn.sh | |
MONGO_USER="" | |
MONGO_PASS="" | |
HOST_1="10.135.7.252" | |
HOST_2="10.135.4.81" |
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 { dim, red, bold, italic, underline } from "https://deno.land/std/colors/mod.ts"; | |
function printEmptyELBs(elbs: object[]): void { | |
elbs["LoadBalancerDescriptions"].map((elb) => { | |
let name = elb["LoadBalancerName"]; | |
let dnsName = elb["DNSName"]; | |
if (elb["Instances"].length < 1) { | |
console.log(bold(red("Name:")), red(name)); | |
console.log(bold(red("DNS:")), red(dnsName)); | |
console.log(dim(red(" no instances"))); |
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
#ifndef LIST_H | |
#define LIST_H | |
#include <stdlib.h> | |
// linked list elements | |
typedef struct ListElm_ { | |
void *data; | |
struct ListElm_ *next; | |
} ListElm; |
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/bash | |
# centos6 build | |
yum install -y glibc zlib-static flex-devel wget | |
fb_version="fluent-bit-1.2.1" | |
wget https://fluentbit.io/releases/1.2/$fb_version.tar.gz | |
tar -xzf $fb_version.tar.gz | |
cd ${fb_version}/build |
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
define("nginx/mod", ["require", "exports"], function (require, exports) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.NginxPackage = "nginx"; | |
}); | |
define("install-nginx-ubuntu", ["require", "exports", "nginx/mod"], function (require, exports, mod_ts_1) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
async function main() { | |
// Install nginx with apt |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>IceTimux / Andres Michel</string> | |
<key>name</key> | |
<string>One Dark</string> | |
<key>settings</key> | |
<array> |
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/bash | |
# Requires gcloud and jq to be installed | |
# Get instance name and zone, required for our gcloud query | |
INSTANCE_NAME=$(curl --silent "http://metadata.google.internal/computeMetadata/v1/instance/name" -H "Metadata-Flavor: Google") | |
ZONE=$(curl --silent "http://metadata.google.internal/computeMetadata/v1/instance/zone" -H "Metadata-Flavor: Google") | |
# Get a giant blob of json with our instance's metadata | |
METADATA=$(gcloud compute instances describe $INSTANCE_NAME --zone $ZONE --format json) |
OlderNewer