Skip to content

Instantly share code, notes, and snippets.

View opsymcdevface's full-sized avatar

Zee Do opsymcdevface

View GitHub Profile

Generate Key

gpg --full-generate-key

List Keys

gpg -K --keyid-format long --with-colons --with-fingerprint

Keybase proof

I hereby claim:

  • I am ctrlaltreboot on github.
  • I am ctrlaltreboot (https://keybase.io/ctrlaltreboot) on keybase.
  • I have a public key ASCs2W8Utq5dS6YbyVV_WQpCV7PrHubXu4715GPy2Pb94Ao

To claim this, I am signing this object:

@opsymcdevface
opsymcdevface / squid3-delaypools.txt
Last active July 24, 2016 01:03
Squid3 delay pools configuration
# DELAY POOL PARAMETERS
# ----------------------------------------------------------------------------
# lone delay pool
delay_pools 1
# look into the documented /etc/squid3/squid.conf config file
# the line below means delay pool 1 belongs to a class 1 delay pool
# *everything is in a single delay bucket*
delay_class 1 1
@opsymcdevface
opsymcdevface / InstallCert.java
Created June 13, 2016 00:17
InstallCert.java
/*
*
* http://blogs.oracle.com/gc/entry/unable_to_find_valid_certification
*
* Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
@opsymcdevface
opsymcdevface / git-remove-history.sh
Created February 22, 2016 08:59
git-remove-history.sh
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0
@opsymcdevface
opsymcdevface / git-author-rewrite.sh
Created February 22, 2016 08:59
git-author-rewrite.sh
#!/bin/bash
git filter-branch --env-filter '
OLD_EMAIL="email@address1.com"
CORRECT_NAME="RJ"
CORRECT_EMAIL="email@address2.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@opsymcdevface
opsymcdevface / springboot.json
Created January 12, 2016 14:56
springboot.json
{
"kind": "List",
"apiVersion": "v1",
"metadata": {
"name": "springboot-s2i"
},
"items": [{
"apiVersion": "v1",
"kind": "BuildConfig",
"metadata": {

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@opsymcdevface
opsymcdevface / catchpointoutline
Created May 15, 2013 13:42
CatchPoint Tutorial Outline
- Introduction
Hello, I'm <name_here>. Blah blah blah.
- Catchpoint what it is, what it's not.
-- You know, for tests.
- Basic Workflow.
-- Login
-- Home
@opsymcdevface
opsymcdevface / gist:5530219
Created May 7, 2013 04:16
Ansible conditional
From site.yml
vars:
- is_vanilla: "'{{ nginx-install-type }}' == 'vanilla'"
- is_passenger: "'{{ nginx-install-type }}' == 'passenger'"
From roles/common/tasks/main.yml
- include: ../setup/install-gem.yml gem=passenger
when: '{{ is_passenger }}'