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.
#!/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.
#
package main
import (
"os"
"fmt"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname