Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Gustavo Matias gumatias

🏠
Working from home
View GitHub Profile
@gumatias
gumatias / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gumatias
gumatias / repl.clj
Last active Aug 29, 2015
My nasty Clojure REPL
View repl.clj
; Didn't looking on how to run it standalone, so it needs to run inside a REPL!
(defn repl []
(let [result (eval (read-string (read-line)))]
(println result)
(recur)))
@gumatias
gumatias / repl.rb
Last active Aug 29, 2015
My nasty Ruby REPL
View repl.rb
#!/usr/bin/env ruby
def repl
input = gets.chomp
result = eval input
puts result
repl
end
repl
@gumatias
gumatias / find_and_replace_all.sh
Last active Apr 19, 2018
[Find and replace strings in directory] bash shortcut to find and replace a string across all files under a specified dir #Utilities
View find_and_replace_all.sh
find . -type f -name '*.js.coffee' -exec sed -i '' s#find#replace#g {} +
@gumatias
gumatias / promise.js
Created Dec 30, 2015
promises vts blog post
View promise.js
// This is my task requested by mom every time we would go grocery shopping
function checkCookiePrice() {
var defer = $q.defer();
setTimeout(function () {
// very random. I could only believe in God back then...
var random = Math.floor(Math.random() * 3);
if (random == 0)
// YES!
@gumatias
gumatias / hub.sh
Last active Aug 27, 2018
[VTS GitHub PR Template] Generates PR Template #Template #GitHub
View hub.sh
PR_JIRA_ISSUE=`g s | cut -d '/' -f 2`
BRANCH_DESCRIPTION=`g s | cut -d '/' -f 3`
PR_TITLE="${BRANCH_DESCRIPTION//-/ }"
g pull-request -r "viewthespace/convertibles" -l "qa" -m "[$PR_JIRA_ISSUE] $PR_TITLE This PR will... @viewthespace/convertibles" -e
View solano-ci-alert.js
alertWhenDone = function() { if($('.summary-message.running').length === 0) alert('Build is done') }
setInterval(alertWhenDone, 20*1000)
View la-cucaracha.md

Public content for La Cucaracha

View one-step-to-journal.sh
#!/usr/bin/env zsh
################################################################################################################
#
# This script will quickly set you up with Github Pages and jrnl to get you up and running journaling online for
# whatever your purpose is.
#
# How to run: `source one-step-to-journal.sh && bootstrap_github_journal_page`
#
# A few things to note: