[INPUT]
Name mem
Tag mem.local
[OUTPUT]
Name stdout
function genId(len) { | |
var text = ""; | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
for (var i = 0; i < len + 1; i++) | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
return text; |
#!/bin/bash | |
function clock() { | |
clear | |
TZ=US/Pacific date "+LA : %Y/%m/%d %a — %I:%M %p" | |
TZ=US/Eastern date "+New York : %Y/%m/%d %a — %I:%M %p" | |
TZ=Europe/Amsterdam date "+Amsterdam : %Y/%m/%d %a — %I:%M %p" | |
TZ=Asia/Bangkok date "+Bangkok : %Y/%m/%d %a — %I:%M %p" | |
TZ=Japan date "+Tokyo : %Y/%m/%d %a — %I:%M %p" | |
TZ=Australia/Melbourne date "+Melbourne : %Y/%m/%d %a — %I:%M %p" |
#!/bin/bash | |
git clone https://github.com/octo-technology/kubernetes-icons.git | |
cd kubernetes-icons/png | |
rm -rf tmp | |
rm *iuml | |
rm *uml | |
mkdir tmp |
-- Enable pl/v8: | |
CREATE EXTENSION plv8; | |
-- Create json history table: | |
CREATE TABLE json_history (id BIGSERIAL PRIMARY KEY, tstamp timestamp DEFAULT now(), table_name text, column_name text, target_id bigint, transform json); | |
-- Create test table: | |
CREATE TABLE test_json (id BIGSERIAL PRIMARY KEY, data JSON); | |
-- Enable history tracking on test_json.data: |
I use PlantUML a lot. It's what I use for drawing all sorts of diagrams and it's handy because of its easy markup (once you get used to it) while making things easy to maintain as projects grow (thanks to version control)
This gist details how I do my PlantUML workspace in a project.
globals
directory for all diagrams to follow (like the "stylesheet" below) to keep things consistent.stylesheet.iuml
file keeps the use of colors consistent through use of basic FOREGROUND, BACKGROUND and ACCENT colors.style-presets.iuml
file defines these colors so you can make "presets" or "themes" out of them.stylesheet.iuml
, you'll need the Roboto Condensed and Inconsolata fonts for these to work properly.#!/bin/bash | |
# Using ffmpeg 2.8 | |
SIZE=1920x1080 | |
SPEED=.5 | |
CAMERA_MODE=track | |
FRAMERATE=30 | |
gource \ | |
-r $FRAMERATE \ |
#!/bin/sh | |
SOURCE_TABLE=xxx-mydata-accp | |
TARGET_TABLE=xxx-mydata-prod | |
AWS_PROFILE=default | |
AWS_REGION=ap-southeast-2 | |
# Step 1 - export and transform | |
aws --profile=$AWS_PROFILE \ |
#!/bin/sh | |
AWS_PROFILE=my-profile | |
AWS_REGION=ap-southeast-2 | |
aws --profile=$AWS_PROFILE \ | |
--region=$AWS_REGION \ | |
cloudfront list-distributions \ | |
| jq '.DistributionList.Items[].Origins.Items[] | {Id: .Id, OriginPath: .OriginPath}' |
import svgwrite | |
import math | |
import json | |
class Pyramid: | |
def __init__(self, data, filename, height=500): | |
self.data = data | |
self.filename = filename | |
self.height = height | |
self.width = 2 * height |