This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Create BEM Block": { | |
"prefix": "BEMBlock", | |
"body": [ | |
"\\$block: '${1:Block}';", | |
"", | |
".#{\\$block} {", | |
"\t$2", | |
"}" | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"current_page": 1, | |
"data": [ | |
{ | |
"id": 3, | |
"name": "Campaña Mexico II", | |
"vertical": { | |
"id": 2, | |
"name": "Adult" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {prop, split, fromPairs, fromPairs, map, compose, tail} = R // from RamdaJS | |
export const URLSearchToObject = compose( | |
fromPairs, | |
map(split('=')), | |
compose( | |
split('&'), | |
tail | |
) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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% |
NewerOlder