Skip to content

Instantly share code, notes, and snippets.

View imabuddha's full-sized avatar
👨‍💻
Looking for work

John Mifsud imabuddha

👨‍💻
Looking for work
View GitHub Profile
@afternoon
afternoon / xmltest.erl
Created February 22, 2013 15:41
Examples of generating XML with Erlang's xmerl library.
-module(xmltest).
-compile(export_all).
-include_lib("xmerl/include/xmerl.hrl").
%% @doc Helper function to generate XML from a data structure and print it
serialize(Data) ->
Xml = lists:flatten(xmerl:export_simple(Data, xmerl_xml)),
io:format("~s~n", [Xml]).
@imabuddha
imabuddha / Start ssh-agent on login.md
Created December 8, 2020 09:14
Start ssh-agent on login, still need to enter passphrase once when used

On Arch Linux, the following works really great (should work on all systemd-based distros):

Create a systemd user service, by putting the following to ~/.config/systemd/user/ssh-agent.service:

[Unit]
Description=SSH key agent

[Service]
Type=simple

Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket

@equivalent
equivalent / bootstrap_breadcrumbs_builder.rb
Last active August 29, 2015 13:58 — forked from riyad/bootstrap_breadcrumbs_builder.rb
breadcrumbs_on_rails for Bootstrap 3 override
# The BootstrapBreadcrumbsBuilder is a Bootstrap compatible breadcrumb builder.
# It provides basic functionalities to render a breadcrumb navigation according to Bootstrap's conventions.
#
# Originally from https://gist.github.com/riyad/1933884/ modified for Bootstrap 3 and "Go to hell with separator, use Css Dumbass"
# policy
#
# You can use it with the :builder option on render_breadcrumbs:
# <%= render_breadcrumbs :builder => ::BootstrapBreadcrumbsBuilder" %>
#
#