Skip to content

Instantly share code, notes, and snippets.

View taverasmisael's full-sized avatar
:shipit:
Focusing

Misael Taveras taverasmisael

:shipit:
Focusing
View GitHub Profile
@taverasmisael
taverasmisael / deleteFolder.bat
Created October 6, 2015 01:49
This simple "bat" script will help windows user to delete folders with large path, with "Robocopy" help. For example delete node_modules folder
@echo off
if {%1}=={} @echo Syntax: DelFolder FolderPath&goto :EOF
if not exist %1 @echo Syntax: DelFolder FolderPath – %1 NOT found.&goto :EOF
setlocal
set folder=%1
set MT=”%TEMP%\DelFolder_%RANDOM%”
MD %MT%
RoboCopy %MT% %folder% /MIR
RD /S /Q %MT%
RD /S /Q %folder%
@taverasmisael
taverasmisael / removeLarge.ps1
Created October 19, 2015 16:12
This PowerShell script simply delete, with robocopy, a folder with large path files on windows. By default it deletes node_modules
# Use: removeLarge.ps1 folder_you_want_to_delete
param([String]$folder='.\node_modules')
mkdir empty_dir
robocopy empty_dir $folder /s /mir
rmdir empty_dir
rmdir $folder
@taverasmisael
taverasmisael / URLSearchToObject.js
Last active September 22, 2018 15:10
A helper using Ramda to transform a URLSearch to an Object
const {prop, split, fromPairs, fromPairs, map, compose, tail} = R // from RamdaJS
export const URLSearchToObject = compose(
fromPairs,
map(split('=')),
compose(
split('&'),
tail
)
)
@taverasmisael
taverasmisael / get_flows.json
Last active September 24, 2018 20:55 — forked from joel-extremo/get_flows.json
get flows
{
"current_page": 1,
"data": [
{
"id": 3,
"name": "Campaña Mexico II",
"vertical": {
"id": 2,
"name": "Adult"
},
@taverasmisael
taverasmisael / scss.json
Last active September 28, 2018 18:02
VS Code snippet for BEM in SCSS
{
"Create BEM Block": {
"prefix": "BEMBlock",
"body": [
"\\$block: '${1:Block}';",
"",
".#{\\$block} {",
"\t$2",
"}"
],
@taverasmisael
taverasmisael / DisplayFacebookReactions.js
Created October 13, 2018 04:14
A function to display facebook like reactions '(You, Marie and 3 more reacted to this)'
// Some helper functions. Self-explanatories
const equal = (a, b) => a === b
const length = a => a.length
const not = a => !a
const lengthEqual = (arr, val) => equal(length(arr), val)
const lastIndex = arr => length(arr) - 1
/**
* This function returns a string based on a names array composing the 'People reacted to this' from facebook.
* It takes in cosideration if: You reacted, no one reacted, only one people reacted, you were the only one reacting
@taverasmisael
taverasmisael / keybindings.json
Created December 27, 2018 04:16
Custom VS Code Keybindings
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+cmd+alt+shift+s",
"command": "editor.saveAll"
},
{
"key": "ctrl+tab",
"command": "workbench.action.nextEditor"
},
@taverasmisael
taverasmisael / reset.css
Created March 20, 2019 21:43
A complete yet basic but powerful CSS reset by Zell
/*
*
* Made a gist from amazing article by Zell
* @url: https://zellwk.com/blog/css-reset/
*
*/
html {
box-sizing: border-box;

Keybase proof

I hereby claim:

  • I am taverasmisael on github.
  • I am misaeltaveras (https://keybase.io/misaeltaveras) on keybase.
  • I have a public key ASBYtUwwv3wLaV7lElGTfa2SnlqDFOM_ch9nV1KTmerymgo

To claim this, I am signing this object:

import {render, simulate} from 'test-library-for-react'
import Component from './Component'
describe ('my obscure test', () => {
// This test does not add any value even though it passes
// and probably meet the code coverage requirement.
it ('should work', () => {
const component = render(<Component />)
simulate.click(component.find('button'))
// Waaat! No idea what the click was supposed to do