Skip to content

Instantly share code, notes, and snippets.

View FrancisMurillo's full-sized avatar

Francis Murillo FrancisMurillo

View GitHub Profile
@FrancisMurillo
FrancisMurillo / schema-maker.js
Created July 26, 2016 02:10
RethinkDB Schema Maker
const r = require('rethinkdb');
const sampleSchema = {
name: 'mydb',
tables: [
{
name: 'users',
// Not really used but as a schema reference
@FrancisMurillo
FrancisMurillo / flexer.el
Last active September 13, 2016 02:42
2016-09-13 - Best Flex Matcher
; -*- lexical-binding: t; -*-
(require 'dash)
(require 's)
(require 'smex)
(require 'promise)
(require 'stream)
(require 'transducer )
@FrancisMurillo
FrancisMurillo / fmc-helm-projectile-completion-fn.el
Last active October 6, 2016 08:23
My custom helm completion for projectile
(require 'dash)
(require 's)
(require 'f)
(defface fmc/completion-label-face '((t (:weight bold :height 1.1)))
"Label face")
(defface fmc/completion-delimiter-face '((t (:weight light :height 0.9)))
"Delimiter face")
@FrancisMurillo
FrancisMurillo / prodigy-binder-hack.el
Created October 9, 2016 10:11
2016-10-09 - Prodigy Automatic Key Binding
(defvar fn/prodigy-command-name-prefix "fmpv/"
"The prefix when creating binding prodigy view commands.")
(defun fn/prodigy-switch-to-process-buffer (service)    
"Just an wrapper for said function with SERVICE."
(prodigy-switch-to-process-buffer service))
(defun fn/prodigy-prepared-switch-to-process-buffer (service)
"Another wrapper to make specific functions for viewing SERVICE."    
(lexical-let* ((service-name (plist-get service :name))
@FrancisMurillo
FrancisMurillo / insert-relative-path.el
Last active October 15, 2016 08:10
2016-10-15 - Insert Relative Path
(require 'f)
(defconst fn/relative-same-node "."  
"Represents the same node on a path.")
(defconst fn/relative-parent-node ".."  
"Represents the parent node on a path.")
(defun fn/relative-parent-node-thunk (&rest args)
"Always returns `fn/relative-parent-node'."
@FrancisMurillo
FrancisMurillo / 2017-01-11 - w3m-vlc.el
Created January 10, 2017 14:18
2017-01-11 - w3m with vlc
(defcustom fn/w3m-video-executable "vlc"
"The executable that can run a network video stream.")
(defcustom fn/w3m-video-args
(list
;; This skews how the process is managed for vlc
;; "--one-instance"
;; "--play-and-exit"
)
"Extra arguments to run `fn/w3m-video-executable'")
@FrancisMurillo
FrancisMurillo / meow.el
Created January 12, 2017 07:38
Literate Org Haskell
(defconst fn/haskell-file-extension ".hs"
"The de facto haskell file extension.")
(defun fn/add-haskell-file-extension (name)
"Add the extension of .hs to a file or buffer NAME."
(if (string/ends-with name fn/haskell-file-extension)
name (concat name fn/haskell-file-extension)))
(defvar fn/org-haskell-mode-hook nil
"Hook when buffer is haskellized.")
@FrancisMurillo
FrancisMurillo / projectile-project-loader.el
Last active January 14, 2017 02:03
Projectile Project Loader
(with-eval-after-load 'projectile
(defconst fn/project-file ".project.el"
"Project configuration file")
(defconst fn/project-local-file ".project-locals.el"
"Project local setting file")
(defconst fn/project-init-files (list fn/project-file fn/project-local-file)
"Project init files")
(with-eval-after-load 'projectile
(defconst fn/project-file ".project.el"
"Project configuration file")
(defconst fn/project-local-file ".project-locals.el"
"Project local setting file")
(defconst fn/project-init-files (list fn/project-file fn/project-local-file)
"Project init files")
@FrancisMurillo
FrancisMurillo / OrgTbl YAML Export.el
Created January 18, 2017 06:47
OrgTbl YAML Export
(defun fn/orgtbl-to-yaml (table params)
"Convert an org table to yaml."
(lexical-let ((headers
(mapcar
(lambda (header)
(replace-regexp-in-string
" " "-"
(downcase header)))
(car table)))
(zip