Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View donkeysharp's full-sized avatar
💭
Breaking it... Fixing it... Dreaming it... Coding it...

Sergio Guillen donkeysharp

💭
Breaking it... Fixing it... Dreaming it... Coding it...
View GitHub Profile
@donkeysharp
donkeysharp / 0-auto-manged-chef-repo.md
Created May 12, 2016 17:53 — forked from gmr/0-auto-manged-chef-repo.md
This gist has files that are used to automate chef repository submodules used for roles, data bags, cookbooks and environments, ultimately uploading the maintained chef repository to chef via knife using Jenkins and Github.

The files in this gist are for having Jenkins automatically manage a chef repository using git submodules. This allows for clean, clutter free management of individual cookbooks, and individual respositories for roles, environments and data bags in our chef-repo.

The process relies on using Github (we use Github Enterprise) and Jenkins in combination with the Jenkins Github plugin to notify Jenkins when a repository has changed.

Our chef-repo directory looks something like:

chef-repo
    - cookbooks
          - Each cookbook is a git submodule managed by Jenkins
    - data_bags (git submodule managed by Jenkins)
@donkeysharp
donkeysharp / build_artifact.py
Created June 26, 2016 22:42 — forked from grncdr/build_artifact.py
script to pack up a python project and all of it's dependencies in a tarfile using virtualenv
import subprocess
import shutil
import os
import sys
import tarfile
def get_version(project_root):
process = subprocess.Popen(
['git', 'describe'],
stdout=subprocess.PIPE,
@donkeysharp
donkeysharp / shared_folder_centos_virtualbox.txt
Created September 1, 2016 21:20 — forked from larsar/shared_folder_centos_virtualbox.txt
Mount shared folder on CentOS in VirtualBox
# The VirtualBox documentation[1] for how to install guest additions
# for Linux on a virtual host is somewhat messy. So here is what
# I did to make it work.
# Install the packages required
yum update
yum install gcc kernel-devel make
reboot
@donkeysharp
donkeysharp / latency.txt
Created January 31, 2017 17:37 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .