Skip to content

Instantly share code, notes, and snippets.

View expalmer's full-sized avatar

Palmer Oliveira expalmer

View GitHub Profile
@expalmer
expalmer / slim-redux.js
Created January 27, 2016 16:51 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@expalmer
expalmer / helpers.js
Created March 5, 2016 14:55
Todo List Vanilla JS
;(function(context) {
'use strict';
function $( selector, scope ) {
return $.qsa( selector, scope, true );
}
$['qsa'] = function( selector, scope, first ) {
var e = ( scope || document).querySelectorAll( selector );
@expalmer
expalmer / README.md
Created March 29, 2017 17:53 — forked from csswizardry/README.md
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vsp **/*<partial file name><Tab>
const Box = x => (
{
map: f => Box(f(x)),
fold: f => f(x)
}
);
const splitEvery = (list, n) => {
const result = [];
let idx = 0;
@expalmer
expalmer / index.html
Last active August 4, 2017 18:17
Budo + React + ES6 + Babel
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>App</title>
</head>
<body>
<div id="app"></div>
<script src="index.js"></script>
</body>
@expalmer
expalmer / arquivo.txt
Last active October 3, 2017 15:35
Analisador Léxico
a
a
int
asd
as123
99
99.
99.999
float
real a
import java.io.*;
%%
%byaccj
%{
// Armazena uma referencia para o parser
private Parser yyparser;
@expalmer
expalmer / t11.c
Last active March 14, 2019 13:53
Sistemas Distribuidos
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int nEp = 1;
int tam = 12;
int n = 4;
int *vA = (int *)malloc(tam * sizeof(int));
@expalmer
expalmer / cloudSettings
Last active December 30, 2019 20:28
VSCode Globo
{"lastUpload":"2019-12-30T18:07:06.125Z","extensionVersion":"v3.4.3"}
@expalmer
expalmer / Default%20%28OSX%29.sublime-keymap
Last active December 30, 2019 20:24
SublimeText3 Globo
{
// The Nodejs installation path
"node_path": {
"windows": "node.exe",
"linux": "/usr/bin/nodejs",
"osx": "/usr/local/bin/node"
},
// The location to search for a locally installed eslint package.
// These are all relative paths to a project's directory.