Skip to content

Instantly share code, notes, and snippets.

View edrpls's full-sized avatar
😶‍🌫️

Eder Sánchez edrpls

😶‍🌫️
  • Mexico
  • 19:46 (UTC -06:00)
View GitHub Profile
@edrpls
edrpls / hastecp
Created May 29, 2014 17:01
Uploads any text file to hastebin.com and copies its URL to the clipboard
#!/bin/sh
# The host must have already installed haste and pbcopy
# The expected param is a path to any given file
cat $1 | haste | pbcopy
@edrpls
edrpls / .zshrc
Created May 15, 2015 18:48
.zshrc
export LANG="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_CTYPE="UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
set DEFAULT_USER="Éder"
@edrpls
edrpls / gist:b28253173a09fe66cee0
Created September 28, 2015 20:55
Fish Config
set default_path /usr/bin /usr/sbin /bin /sbin
set npm_path $HOME/npm/bin
set homebrew /usr/local/bin /usr/local/sbin
set -gx PATH $homebrew $npm_path $default_path
set PATH /Applications/Postgres.app/Contents/Versions/9.4/bin $PATH
#set -xg PATH /usr/local/sbin $HOME/npm/bin $PATH
if test -z $rvm_bin_path
exec bash --login -c "exec fish" ^&1
@edrpls
edrpls / .eslintrc
Created November 24, 2015 19:48
ESLint Nov 15
{
"rules": {
"no-console": [0],
"strict": [2, "global"],
"no-undef": [
2
],
"indent": [
2,
4
set -xg EDITOR vim
set -xg NODE_ENV development
set -gx FZF_DEFAULT_COMMAND 'ag -l -g ""'
#set -x PATH /usr/local/opt/go/libexec/bin $PATH
#set -x GOPATH $HOME/go
#set -x GOROOT /usr/local/opt/go/libexec
#set -x PATH $PATH $GOPATH/bin
#set -x PATH $PATH $GOROOT/bin
alias gitst "git status"
alias git "hub"
@edrpls
edrpls / .vimrc
Last active April 8, 2016 22:10
.vimrc
set nocp
set t_Co=256
set shell=bash\ --norc
"set runtimepath^=~/.vim/bundle/ctrlp.vim
let mapleader = ","
"javascript-libraries-syntax.vim
let g:used_javascript_libs = 'underscore,jquery,angularjs,angularui'
"EditorConfig + fugitive
@edrpls
edrpls / notifier.fish
Last active May 3, 2016 03:55
Simple OSX notification API fish script
function notifier
switch (count $argv)
case 0 1
echo "Usage: notifier [notification message] [title] [subitle]"
case 2
set notification "display notification \"$argv[1]\" with title \"$argv[2]\""
osascript -e $notification
case 3
set notification "display notification \"$argv[1]\" with title \"$argv[2]\" subtitle \"$argv[3]\""
osascript -e $notification
@edrpls
edrpls / tmux.conf
Created March 20, 2018 04:31
tmux on antergos
set -sg escape-time 0
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
is_fzf="ps -o state= -o comm= -t '#{pane_tty}' \
@edrpls
edrpls / createFluxStore.js
Created June 27, 2018 00:55
Copy of Redux' createStore to ease migrations from Flux to Redux
// This file is base is based on https://github.com/vivek3003/flux-redux-migration, with some modifications
// for flux's actionTypes and other validations
import isPlainObject from 'lodash/isPlainObject';
import { createStore } from 'redux';
/**
* This is a copy of Redux's createStore. Only the dispatch function is modified.
* It passes the action Type as parameter to the callbacks registered by store.subscribe *
* /
@edrpls
edrpls / init.vim
Last active February 15, 2019 18:44
init.vim on antergos
"set shell=/bin/sh
set termguicolors
set number
set ruler
set relativenumber
set cursorline
set synmaxcol=1000
set clipboard=unnamed
set list listchars=tab:▸\ ,eol:¬,trail:·