Skip to content

Instantly share code, notes, and snippets.

@gravitylow
gravitylow / codesign_gdb.md
Last active April 16, 2024 02:18 — forked from hlissner/codesign_gdb.md
Codesign gdb on macOS

If you are getting this in gdb on macOS while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
  1. Open Keychain Access
  2. In menu, open Keychain Access > Certificate Assistant > Create a certificate
  3. Give it a name (e.g. gdbc)
@ddragosd
ddragosd / api-gateway-marathon-setup.sh
Last active April 9, 2018 04:31
API Gateway setup in Mesos and Marathon
# PREREQUISITES:
# Setup a Mesos cluster and install Marathon framework
MARATHON_HOST="http://<marathon_host>/marathon"
# this could be an internal ELB that the Gateway nodes can use to auto-discover services
INTERNAL_MARATHON_HOST="http://<internal_marathon_host>/marathon"
# a wildcard domain configured with *.api.anydomain
API_DOMAIN="api.<my-domain>"
# -------------------------
@tamirko
tamirko / SMALL_LINUX.groovy
Created August 16, 2014 06:28
SMALL_LINUX
SMALL_LINUX : computeTemplate {
// 3839 is a Red Hat Enterprise Linux - 6 (64 bit)
imageId "3839"
// Mandatory. Files from the local directory will be copied to this directory on the remote machine.
remoteDirectory "/tmp/gs-files"
// Mandatory. Amount of RAM available to machine.
machineMemoryMB 4096
// Mandatory. Hardware ID.
hardwareId largeHardwarePrivateOnlyId
// Mandatory. All files from this LOCAL directory will be copied to the remote machine directory.
@tamirko
tamirko / deleteDummyFiles.groovy
Created August 13, 2014 12:47
deleteDummyFiles custom command
"deleteDummyFiles" : { prefix, xFiles ->
def p = ~/$prefix.*\.txt/
def counter=0
def howManyfiles = xFiles.toInteger()
println "Deleting ${howManyfiles} .txt files '${prefix}*' in ${dummyFilesFolder} ..."
new File(dummyFilesFolder).eachFileMatch(p) {f ->
if ( counter < howManyfiles ) {
counter++
println "Deleting file #${counter} ${f.getName()} ..."
f.delete()
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 13, 2024 11:18
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@ody
ody / gist:5718115
Last active December 18, 2015 03:29
---
# Data needed for Class['openstack::compute']
# The IP and interface that external sources will use to communicate with the instance and hypervisors.
openstack::compute::public_interface: 'eth0'
openstack::compute::internal_address: "%{ipaddress_eth0}"
openstack::compute::iscsi_ip_address: "%{ipaddress_eth0}"
# The interface that will handle instance to intance communication and instance outbound traffic.
openstack::compute::private_interface: 'eth1'
@dergachev
dergachev / README.md
Created October 10, 2012 16:49
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@harperreed
harperreed / peter-thiels-cs183-startup-class-01-notes-essay.md
Created July 29, 2012 21:20
Notes Essays—Peter Thiel’s CS183: Startup—Stanford, Spring 2012

Here is an essay version of my class notes from Class 1 of CS183: Startup. Errors and omissions are my own. Credit for good stuff is Peter’s entirely.

CS183: Startup—Notes Essay—The Challenge of the Future

Purpose and Preamble

@jboner
jboner / latency.txt
Last active May 23, 2024 06:51
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
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