Skip to content

Instantly share code, notes, and snippets.

View saitodisse's full-sized avatar

Julio M Saito saitodisse

  • Linx
  • São Paulo, Brasil
  • 03:59 (UTC -03:00)
View GitHub Profile
@saitodisse
saitodisse / android-apps.md
Last active January 26, 2017 04:00
android-app-list
@mihow
mihow / load_dotenv.sh
Last active December 6, 2024 03:28
Load environment variables from dotenv / .env file in Bash
# The initial version
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
# My favorite from the comments. Thanks @richarddewit & others!
set -a && source .env && set +a
@gilyes
gilyes / Backup, restore postgres in docker container
Last active October 8, 2024 11:59
Backup/restore postgres in docker container
Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres
@Obooman
Obooman / UploadImage.js
Created May 16, 2016 05:27
react-native bulit-in tool for image upload
export function postData (url, params, fileURL) {
let data = new FormData()
if (fileURL) {
data.append('image', {uri: fileURL, name: 'image.jpg', type: 'image/jpg'})
}
_.each(params, (value, key) => {
if (value instanceof Date) {
data.append(key, value.toISOString())
} else {
data.append(key, String(value))
@infoslack
infoslack / sumario.md
Last active December 2, 2015 11:22
Livro de Docker
  1. Introdução
  • O que é Docker ?
  • O que diferencia um container de uma máquina virtual ?
  • O que são Namespaces ?
  • Para que serve o Cgroups ?
  • O que é Union file systems ?
  1. Explorando o Docker
  • Instalação
  • Hello, Docker!
@nuxlli
nuxlli / agent_start.sh
Created April 23, 2015 19:02
Run azk agent in a script
#!/bin/bash
echo "" > /tmp/azk-agent-start.log
./bin/azk agent start --no-daemon > /tmp/azk-agent-start.log 2>&1 &
AGENT_PID="$!"
tail -f /tmp/azk-agent-start.log &
TAIL_PID="$!"
echo "PIDS - agent: ${AGENT_PID}, tail: ${TAIL_PID}";
until tail -1 /tmp/azk-agent-start.log | grep -q 'Agent has been successfully started.'; do
sleep 2;
@bendc
bendc / functional-utils.js
Last active September 15, 2023 12:12
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
@danielfilho
danielfilho / braziljs-2014-talks.md
Last active November 27, 2022 21:04
Talks, slides and links from BrazilJS 2014

#BrazilJS 2014

Talks: slides & Links

Day Talk Speaker Links
1 Why ServiceWorker may be the next big thing Renato Mangini interview · slides · video
1 Frontend at Scale - The Tumblr Story Chris Miller interview · slides · video
1 Intro to GFX: Raw WebGL Nick Desaulniers interview · slides · video
@anissen
anissen / .jscs.json
Last active January 25, 2024 23:58
Example gulpfile for some useful tasks
{
"requireCurlyBraces": ["else", "for", "while", "do", "try", "catch"],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireRightStickedOperators": ["!"],
"requireLeftStickedOperators": [","],
"disallowImplicitTypeConversion": ["string"],
"disallowKeywords": ["with"],
"disallowMultipleLineBreaks": true,