Skip to content

Instantly share code, notes, and snippets.

View andytill's full-sized avatar

Andy Till andytill

View GitHub Profile
@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))]).
@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"
@aras-p
aras-p / preprocessor_fun.h
Last active May 23, 2024 08:26
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,
@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/
@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
@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

On the Viability of Erlang Releases and CouchDB

There has been some discussion on what versions of Erlang CouchDB should support, and what versions of Erlang are detrimental to use. Sadly there were some pretty substantial problems in the R15 line and even parts of R16 that are landmines for CouchDB. This post will describe the current state of things and make some potential recommendations on approach.

Scheduler Collapse

@cpdean
cpdean / doge.md
Last active November 21, 2021 08:51
YOU'RE WELCOME, INTERNET. -- if you search for an ascii doge, you don't get anything great that you can copy paste. found a silly gif (http://cmang.org/ascii/cm-doge-bw.gif) and i have transcribed it for all of you

no clue who made this, but ARTIST FOUND thank you @indyjoenz / cmang!

i have transcribed it here:

                Y.                      _   
                YiL                   .```.  
                Yii;                .; .;;`.    
                YY;ii._           .;`.;;;; :    
 iiYYYYYYiiiii;;;;i` ;;::;;;; 
import edu.uci.ics.jung.algorithms.layout.CircleLayout;
import edu.uci.ics.jung.algorithms.layout.Layout;
import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.util.TestGraphs;
import java.awt.Dimension;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.stage.Stage;