Skip to content

Instantly share code, notes, and snippets.

View mrcasals's full-sized avatar
👨‍🚀
🚀

Marc Riera mrcasals

👨‍🚀
🚀
View GitHub Profile
require "erb"
require "pathname"
DOT_TEMPLATE=<<-END
digraph {
size="20,20";
overlap=false;
sep=0.4;
graph [fontname=Helvetica,fontsize=10];
node [fontname=Helvetica,fontsize=10];
@frontendbeast
frontendbeast / sm-annotated.html
Last active June 25, 2020 13:57 — forked from hdragomir/sm-annotated.html
The deferred font loading logic for Smashing Magazine, updated to include IE8 support. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@txus
txus / wtf.rb
Created October 31, 2014 10:56
Haskell-like function composition in Ruby - let the mad horses unleash
require 'blankslate'
class Proc
def self.comp(f, g)
lambda { |*args| f[g[*args]] }
end
def *(g)
Proc.comp(self, g)
end
module RenderToHTML
def self.book
[title, css, body].join("\n")
end
private
def self.title
commit_hash = `git log -1 --pretty="format:%H"`
%{
@adham90
adham90 / spacemacs-keybindings
Last active April 5, 2024 14:24
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
@fxn
fxn / back.html
Last active March 16, 2020 09:02
<div class="card"><div class="content">{{Back}}</div></div>