- author: Thiago Andrade thiagoh@gmail.com
- license: GPLv3
- description:
- watches the given paths for changes
- and executes a given command when changes occur
- usage:
- watchfiles <paths...>
This file contains 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
{"version":1,"resource":"file:///Volumes/workspace/personal/javascript/taggr/.babelrc","entries":[{"id":"sTz0","timestamp":1667160602415}]} |
This file contains 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
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
This file contains 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
# This file should be at this path | |
# ~/.oh-my-zsh/themes/thiagoh.zsh-theme | |
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
PROMPT='${ret_status}%{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' | |
PROMPT='%{$fg[green]%}%n ${ret_status}%{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗" |
This file contains 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
export interface ExternalizedPromise<T> { | |
promise: Promise<T>; | |
resolve: (value?: T | PromiseLike<T>) => void; | |
reject: (reason?: any) => void; | |
} | |
export default { | |
create: function create<T>( | |
executor: (resolve: (value?: T | PromiseLike<T>) => void, rejector: (reason?: any) => void) => void |
This file contains 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 strict'; | |
function $(el) { | |
function $Element() { | |
const self = this; | |
this.$is$ = function $is$() { | |
return true; | |
}; | |
this.style = function style(key, value) { | |
if (/(left|right|top|bottom|background-position-x|background-position-y)/i.test(key)) { |
This file contains 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
## How to run | |
# | |
# npm run main /invalid | |
# | |
const get = url => { | |
if (url.indexOf('/invalid') >= 0) { | |
return Promise.reject({ | |
url, | |
error: 'error message', |
This file contains 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
#!/bin/bash | |
cmd=$1 | |
key=$2 | |
value=$3 | |
file=db.data | |
if [[ "$cmd" = "" ]]; then | |
echo "Invalid command"; | |
exit 1; |
This file contains 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
Array.prototype.mapReduce = function(keyGrouper, reducer) { | |
const emit = (key, value) => ({key, value}); | |
const obj = this | |
.map(value => keyGrouper(emit, value)) | |
.reduce((prev, {key, value}) => { | |
prev[key] = Array.isArray(prev[key]) ? prev[key] : []; | |
return prev[key].push(value) && prev; | |
}, {}); | |
return Object.keys(obj).map(key => reducer(key, obj[key])); | |
}; |
Provarei matematicamente o que esta acontecendo e por que eh legitimo que a revolta popular seja maior contra Lula que contra Aecio.
Temos a regra geral:
Xn * F = Yn
Xn = mal causado por alguem (n)
Yn = revolta popular contra alguem (n)
l = Lula dataset
NewerOlder