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
### Keybase proof | |
I hereby claim: | |
* I am wamaral on github. | |
* I am wamaral (https://keybase.io/wamaral) on keybase. | |
* I have a public key whose fingerprint is 8258 171C 0985 8656 CD61 E06B CBFA 40F7 F5FC D209 | |
To claim this, I am signing this object: |
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
export function ProductsSearch(container) { | |
container.on("focus", "[data-products-search]", enableAutocomplete); | |
container.on("change", "[data-products-search]", resetProduct); | |
container.on("keyup", "[data-products-search]", onTyping); | |
}; | |
const onTyping = (e) => { | |
const input = $(e.target); | |
const quoteItem = input.closest("[data-quote-item]"); |
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
#!/usr/bin/env bash | |
# Browse Ramda documentation in Terminal | |
# Requires jq and a tool such as fzf or peco for interactive filtering | |
LATEST="http://raine.github.io/ramda-json-docs/latest.json" | |
DOCS_URL="http://ramdajs.com/docs/" | |
json=$(curl -s $LATEST) | |
functions=$(echo "$json" | jq -r '.[] | if .sig and (.sig | length > 0) then .name + " :: " + .sig else .name end') |
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
// ==UserScript== | |
// @name Word wrap for errbit | |
// @description Word wrap for errbit | |
// @author wamaral@wamaral.org | |
// @version 1.0.0 | |
// @date 2015-12-15 | |
// @namespace http://bionexo.com.br | |
// @include http://errbit.dev.cloud.bionexo.com.br/* | |
// @match http://errbit.dev.cloud.bionexo.com.br/* | |
// @run-at document-end |
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
#!/usr/bin/ruby | |
input = ARGV[0] | |
output = "" | |
alpha = ("a".."z").to_a | |
key = "bold" | |
idx = 0 | |
input.each_char do |c| |
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
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}⚡%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[red]%}!%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✓%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_SHA_BEFORE="%{$reset_color%}%{$fg[blue]%}[" | |
ZSH_THEME_GIT_PROMPT_SHA_AFTER="]%{$reset_color%}" |
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
# usa o campo "provedor" da ContaDeVideo pra converter pra ContasDeVideo::Provedor | |
rake app:change_contas_de_video_to_namespace | |
# adiciona a string " - Sambatech" a todas as ContasDeVideo::Sambatech (caso já não tenha essa string) | |
rake app:append_sambatech_to_account_name | |
# altera todos os vídeos cadastrados, adicionando a eles a propriedade "conta_de_video", que vai conter os dados da primeira (no caso única) conta sambatech cadastrada para a marca do vídeo | |
# possíveis casos de erro: | |
# - não existe nenhuma conta sambatech pra essa marca (vídeo vai ficar sem "conta_de_video") | |
# - vídeo já tem "conta_de_video" (é checado se o "nome" da conta_de_video é válido, se for a conta_de_video não é alterada) |
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
module MCP | |
module Client | |
class Middleware | |
alias_method :old_validate_token_and_retrieve_user_info, :validate_token_and_retrieve_user_info | |
def validate_token_and_retrieve_user_info(mcp_session_token) | |
mcp_configuration = Alexandria::Yml.read_from_config('mcp') | |
if mcp_configuration[:bypass] && !(%w{stage production}.include? Rails.env) | |
{ | |
"name"=>"*** BYPASS MCP ***", |
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
// SYSTEM | |
con_enable 1 // Allows the console to be activated | |
// NET GRAPH | |
echo "======================" | |
echo "to disable fps:" | |
echo "net_graph 0" | |
echo "======================" | |
net_graph 1 // Draw the network usage graph, 2 = draws data on payload, 3 = draws payload legend |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
; Switch between Speakers / HDMI audio output | |
; Based on this discussion: | |
; http://www.autohotkey.com/board/topic/2306-changing-default-audio-device/ |
NewerOlder