Skip to content

Instantly share code, notes, and snippets.

View andytill's full-sized avatar

Andy Till andytill

View GitHub Profile
@qrilka
qrilka / httpc-test.escript
Created April 4, 2014 14:19
httpc error in R16B03-1
#!/usr/bin/env escript
main(_Args) ->
application:start(sasl),
inets:start(),
BadAddress = "http://10.255.255.1:8000/ru/",
spawn(fun()-> io:format("Res1:~P~n",
[httpc:request(get, {BadAddress,[]},[
{connect_timeout,1000}
],[]%,P
@slfritchie
slfritchie / presentation.md
Created March 18, 2014 09:22
Erlang tracing, for the Riak source code reading series, 2014-03-18, Tokyo, Japan

Erlang Tracing: more than you wanted to know

Rough Outline

  • What can be traced?
  • How can trace events be specified?
  • "match specifications": twisty passages, all alike
  • WTF, can I just use DTrace and drink my coffee/beer/whisky in peace?
  • Trace delivery mechanisms: pick one of two
@joesepi
joesepi / gist:6299513
Last active December 21, 2015 11:29
How to get SublimeLinter working in Sublime Text 3 (ST3)

How to get SublimeLinter working in SublimeText3 (ST3)

This shouldn't be that hard.

I have done a number of things over the last few hours to get this to work and I wasn't taking notes, so this is what I think needs to happen to install SublimeLinter in ST3

The first thing you need to do is uninstall SublimeLinter if you have it installed:

  • Assuming you have Package Controll installed, hit Cmd + Shift + P to bring up the panel and type "remove" and choose "Package Control: Remove Package" and then choose SublimeLinter from the resulting menu

Let's really make sure that all of that SublimeLinter stuff is gone:

  • Navigate to ~/Library/Application\ Support/Sublime\ Text\ 3/
@aras-p
aras-p / preprocessor_fun.h
Last active April 12, 2024 17:24
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@magnetikonline
magnetikonline / LineEndings.sublime-settings
Last active October 20, 2021 18:18
Sublime Text 3 - Display file line ending details in status bar.
{
// To show line endings type on status bar
"show_line_endings_on_status_bar": true,
// show an alert when the line ending is on the list
// eg: "alert_when_line_ending_is": ["Windows","Unix","CR"]
"alert_when_line_ending_is": ["Windows"],
// auto convert line endings on file open
"auto_convert_line_endings_to": "Unix"
@andelf
andelf / beam_decompile.erl
Created March 19, 2013 03:25
Erlang BEAM file decompile to .erl file
#!/usr/bin/env escript
% -*- mode: erlang -*-
main([BeamFile]) ->
{ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(BeamFile,[abstract_code]),
io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]).
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@ferd
ferd / app_deps.erl
Created September 23, 2012 05:33
Quick escript to generate a visualization of app dependencies in Erlang/OTP.
%%% Run with 'escript app_deps.erl'
%%% Change the path in filelib:wildcard/1 as required to capture all
%%% your dependencies.
%%%
%%% Rectangular nodes will represent library apps (no processes involved)
%%% and the circular nodes will represent regular apps. An arrow going from
%%% 'A -> B' means 'A depends on B'.
%%%
%%% This script depends on graphviz being present on the system.
-module(app_deps).
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 23, 2024 15:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname