Skip to content

Instantly share code, notes, and snippets.

👨‍🚀
🚀

Marc Riera mrcasals

👨‍🚀
🚀
Block or report user

Report or block mrcasals

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@adham90
adham90 / spacemacs-keybindings
Last active Nov 11, 2019
spacemacs keybindings that i need to learn
View spacemacs-keybindings
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 |
View gist:51148cebc131daff19de
module RenderToHTML
def self.book
[title, css, body].join("\n")
end
private
def self.title
commit_hash = `git log -1 --pretty="format:%H"`
%{
@txus
txus / wtf.rb
Created Oct 31, 2014
Haskell-like function composition in Ruby - let the mad horses unleash
View wtf.rb
require 'blankslate'
class Proc
def self.comp(f, g)
lambda { |*args| f[g[*args]] }
end
def *(g)
Proc.comp(self, g)
end
@frontendbeast
frontendbeast / sm-annotated.html
Last active Jul 9, 2016 — forked from hdragomir/sm-annotated.html
The deferred font loading logic for Smashing Magazine, updated to include IE8 support. http://www.smashingmagazine.com/
View sm-annotated.html
<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);
View build.rb
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];
@fbeeper
fbeeper / UsableAccentMarks.md
Last active Aug 29, 2015
Usable accentuation on MacOS Lion and above (including Yosemite!)
View UsableAccentMarks.md

Usable accent marks on MacOS Lion and above (including Yosemite!)

Since Mac OS Lion, default "press and hold" of keyboard keys brings an easy access to accents and special characters:

alt text

However, who designed the order of elements in these lists is CLEARLY NOT using them with enough frequency*. Depending with what vowel you invoke this tool, the order of diacritical mark is different:

a à á â ä æ ã å ā
@cmod
cmod / minimal_fb_messenger.css
Last active Apr 25, 2018
Minimal Facebook Messenger for Fluid
View minimal_fb_messenger.css
/*
Minimal Facebook Messenger
==========================
1. Make a Fluid (http://fluidapp.com/) instance of https://facebook.com/messages/
1. a. (You need to buy the paid version of Fluid to modify UserStyles)
2. Apply the below CSS as a Userstyles stylesheet
3. Like magic, you can now message without all the cruft of Full Facebook
@burgalon
burgalon / AccountAuthenticator.java
Last active Nov 12, 2019
Implementing OAuth2 with AccountManager, Retrofit and Dagger
View AccountAuthenticator.java
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
super(context);
View html2md.rb
require 'nokogiri'
class Html2Md
class Link < Struct.new(:href, :title)
end
class Format < Struct.new(:name, :head, :body, :opened)
end
WIDTH = 80
You can’t perform that action at this time.