Skip to content

Instantly share code, notes, and snippets.

View ciarand's full-sized avatar

Ciaran Downey ciarand

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 31, 2024 22:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@burke
burke / debugging.md
Last active January 19, 2016 08:13

Debugging Go on OS X

Step 1: Get GDB.

Some of the fancy features Go adds to GDB require GDB >= 7.1. You can check which version you have with gdb -v. If it's high enough, skip to the next section. If not, do the following:

  1. Follow these instructions: http://www.opensource.apple.com/source/lldb/lldb-69/docs/code-signing.txt. The name doesn't matter really, but gdb_codesign is as good a choice as any.

  2. brew install https://raw.github.com/Homebrew/homebrew-dupes/master/gdb.rb.

@krestenkrab
krestenkrab / erjang-status-aug15.md
Last active December 22, 2017 18:46
Notes on the current status of Erjang

Elixir on Erjang

The last few weeks I've spent some night hacking time to get Erjang to be able to run Elixir. Here's a short note on the current status for those interested.

The bottom line is that we can now boot the Elixir REPL, it looks like this:

krab$ ./bin/iex 
Warning: could not run smart terminal, falling back to dumb one
Aug 26, 2013 11:11:14 AM erjang.EModuleManager$FunctionInfo$1 invoke
@kavu
kavu / example.go
Created September 28, 2013 10:01
Minimal Golang + Cocoa application using CGO. Build with `CC=clang go build`
package main
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Cocoa
#import <Cocoa/Cocoa.h>
int
StartApp(void) {
[NSAutoreleasePool new];
@steeve
steeve / _readme.md
Last active March 7, 2024 12:38
How to cross compile Go with CGO programs for a different OS/Arch

How to cross compile Go with CGO programs for a different OS/Arch

It is possible to compile Go programs for a different OS, even though go build says otherwise.

You'll need:

@aredridel
aredridel / boot-coreos.sh
Last active January 4, 2016 18:12
Set up and boot CoreOS on top of a stock DigitalOcean Fedora 19 install. Abuses the Fedora 19 root as the CoreOS STATE partition. Still todo: copy SSH keys from Fedora install.
#!/bin/sh
kexec --load /boot/coreos_production_pxe.vmlinuz --initrd=/boot/coreos_production_pxe_image.cpio.gz --append='state=/dev/vda root=squashfs: sshkey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQCZ3fvhC7StXFdFRuXApBuXyS2phoH7ZVKMUMOi3DrbnZWC01GUq74WdalRDHtfq2dl0CPctLb8RHSD+/dKgWEH0gmoEOCio09ZAY5Ui4Cy+0cCGefXkUnJR4lgNOYD076BXjJwsCVCD8sMlFFT08Qn4/voP0jpL1uvvoWiC1KSvSjZf7sP/hRgsO633OuclXyVVq7mC6q+2QVg6hfO49Gt7TVXb+8lc8aUHAYyrXEVag6oICWqxWlSglbEpXCXhK4RB1f8h2vCaEPe2Kf1LNPYJ3dN5H5v+tnst9oZbFjo/qNSm4RvPBb3nsNARdcemdGcwiTjAiIn9gMxBMOyiYOYSgVwGd2U76FR0/RUFUORprynn6uebBhtpGzIAuFsUygMAPAM2tocO+t+h8AQviF6IeA9rKwf5bFTXV9HLy+iUoCWsVBmGypfGbsD7UNg3DIpXv4FdoLDDiCq+OV16ludjLk5pjknshH0cII+Q5b1fcITKSMrZ0CnMytkHHYPTvJ/uc2W9p3howAbMCs+WpNsSnLoCfq5ZjWclauV9Sn7OULQSMuKzTBF+bN7FOyolPbFrW+B3ESUpbonbLbKOubvsBjnUQLNoNjH4pa5Sg3Pluh1EoYLq/oKYU/C+SSwnbRy9N1h2z5UZy/CyrGNG8UomkuFIZWOAGH+zqwU1iCYaWHPgUNXM+4gSe0cGmVesFRpco5nhqvHGdDtw3OCC1U0f9jj6Pk+4jFmulj45+Hu4ZEL8wyMlftbycT8KtuqSVOD/yuytPFlvBzFrjP9s3V8ZN46y5rLpR9dAD+DJHYVESGxQV9lLq2g0p8IJ
@h4cc
h4cc / travis-template-with-hhvm-as-allowed-failure.yml
Last active March 10, 2018 05:01
HHVM Travis-Ci template as allowed failure.
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
matrix:
@ciarand
ciarand / index.php
Last active August 29, 2015 13:56
Export / import PHP request details for reproducible debugging
<?php // index.php
// bulletproof debug mode
define("DEBUG_MODE", rand(1, 2) === 1);
if (isset($_GET["trigger"]) && DEBUG_MODE) {
file_put_contents("request.dat", serialize(get_defined_vars()));
}
// go through normal stuff, start the app, etc.
@execjosh
execjosh / atom-0.75.0-block-cursor.patch
Last active November 2, 2019 18:59
Block Cursor for Atom v0.75.0
--- a/Atom.app/Contents/Resources/app/src/cursor-view.js
+++ b/Atom.app/Contents/Resources/app/src/cursor-view.js
@@ -19,7 +19,12 @@
"class": 'cursor idle'
}, (function(_this) {
return function() {
- return _this.raw('&nbsp;');
+ return _this.div({
+ outlet: 'cursorValue',
+ 'style': 'visibility:hidden;'
@kachayev
kachayev / concurrency-in-go.md
Last active May 31, 2024 09:34
Channels Are Not Enough or Why Pipelining Is Not That Easy