Skip to content

Instantly share code, notes, and snippets.

version: '2.1'
services:
pg:
image: postgres:9.3
conjur:
image: cyberark/conjur
command: server -a cucumber
environment:
DATABASE_URL: postgres://postgres@pg/postgres
#!/bin/bash -e
docker pull registry.tld/conjurinc/publish-rubygem
summon --yaml "RUBYGEMS_API_KEY: !var rubygems/api-key" \
docker run \
--rm \
--env-file @SUMMONENVFILE \
-v "$(pwd)":/opt/src \
registry.tld/conjurinc/publish-rubygem conjur-api
#!/bin/bash -e
function finish {
echo 'Removing test environment'
echo '---'
docker-compose down --rmi 'local' --volumes
}
trap finish EXIT
function main() {
#!/usr/bin/env groovy
pipeline {
agent { label 'executor-v2' }
options {
timestamps()
buildDiscarder(logRotator(numToKeepStr: '30'))
}
@cyeong
cyeong / nginx.conf
Created November 8, 2016 02:49 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@cyeong
cyeong / gelfsender.sh
Created August 30, 2016 05:30 — forked from gm3dmo/gelfsender.sh
Send a log message to a gelf server using the shell.
# This script can be used to raise a graylog2/gelf message
# gzip it and send it to a graylog server using netcat (nc)
hostname='gelftester'
short_message='test message short version'
full_message='longer test message. dont\n worry be happy'
level=1
facility='gelftester'
# gnu date
date=$(date +'%s.%N')
@cyeong
cyeong / The Technical Interview Cheat Sheet.md
Last active March 6, 2016 19:51 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@cyeong
cyeong / .tmux.conf
Created March 20, 2015 08:28
tmux conf
# copy and paster
set-option -g default-command "reattach-to-user-namespace -l /usr/local/bin/fish"
bind C-c run "tmux show-buffer | reattach-to-user-namespace pbcopy"
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
# look good
set -g default-terminal "screen-256color"
### set colour for when display-panes command ###
set -g display-panes-active-colour colour226
#!/bin/sh
# To enable this hook, rename this file to "pre-commit".
###############################################################################
# https://gist.github.com/stuntgoat/8800170
# Git pre-commit hook for finding and warning about Python print
# statements.
#
@cyeong
cyeong / art
Created October 17, 2014 08:14
Programming & Art
Why is it so difficult for someone with no prior programming knowledge to learn programming for the first time?
You're fiddling with brushes and wondering why you can't make art.
You have to see something first.
Something unique that you want to share with others.
Once you see this - the brushes become the means to this vision ... The impediment, even. You'll become frustrated with them. Good.