Skip to content

Instantly share code, notes, and snippets.

View gustiando's full-sized avatar
🏠
Working from home

Gustavo Matias dos Santos gustiando

🏠
Working from home
View GitHub Profile
@gustiando
gustiando / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gustiando
gustiando / repl.clj
Last active August 29, 2015 14:15
My nasty Clojure REPL
; 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)))
@gustiando
gustiando / repl.rb
Last active August 29, 2015 14:15
My nasty Ruby REPL
#!/usr/bin/env ruby
def repl
input = gets.chomp
result = eval input
puts result
repl
end
repl
@gustiando
gustiando / find_and_replace_all.sh
Last active April 19, 2018 15:27
[Find and replace strings in directory] bash shortcut to find and replace a string across all files under a specified dir #Utilities
find . -type f -name '*.js.coffee' -exec sed -i '' s#find#replace#g {} +
@gustiando
gustiando / promise.js
Created December 30, 2015 14:39
promises vts blog post
// 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!
@gustiando
gustiando / hub.sh
Last active August 27, 2018 20:58
[VTS GitHub PR Template] Generates PR Template #Template #GitHub
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
alertWhenDone = function() { if($('.summary-message.running').length === 0) alert('Build is done') }
setInterval(alertWhenDone, 20*1000)
@gustiando
gustiando / la-cucaracha.md
Created January 27, 2020 14:20
La Cucaracha

Public content for La Cucaracha

#!/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: