Skip to content

Instantly share code, notes, and snippets.

View ayr-ton's full-sized avatar
⛩️
In the zone

Ayrton ayr-ton

⛩️
In the zone
  • Thoughtworks
  • Belo Horizonte
View GitHub Profile
git checkout development
git reset --soft HEAD~1
git stash
git fetch origin
git reset --hard origin/development
git stash pop
git add .
git commit -m ...
git checkout master
git fetch origin -p
git reset --hard origin/master
git branch --merged | xargs git branch -d
@ayr-ton
ayr-ton / docker-compose.yml
Last active March 14, 2020 01:06
pi-hole with unbound and hsd
version: "3.3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
networks:
dns:
ipam:
config:
- subnet: 172.21.0.0/16
services:
pihole:
@ayr-ton
ayr-ton / harmonia.ipynb
Last active October 26, 2019 00:21
Harmonia.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#! /bin/bash
# Inspired on:
# http://www.thegameengine.org/miscellaneous/streaming-twitch-tv-ubuntu/
# https://wiki.archlinux.org/index.php/Streaming_to_twitch.tv
if [ ! -f ~/.twitch_key ]; then
echo "Error: Could not find file: ~/.twitch_key"
echo "Please create this file and copy past your stream key into it. Open this script for more details."
exit 1;
@ayr-ton
ayr-ton / git-forget-blob
Created May 22, 2018 21:05
Completely remove a file from a git repository history
#!/usr/bin/env bash
# Completely remove a file from a git repository history
#
# Copyleft 2018 by Ayrton Araujo <root _a_t_ ayr-ton _d_o_t_ net>
# GPL licensed (see end of file) * Use at your own risk!
#
# Usage:
# git-forget-blob file_to_forget
# If you move this script to somewhere inside $PATH you could use the script like:
# git forget-blob file_to_forget
@ayr-ton
ayr-ton / rails.bat
Created October 8, 2016 00:06 — forked from diogolundberg/rails.bat
Workaround to Rails installer 3.2.0
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"%~dp0ruby.exe" "%~dp0rails" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"%~dp0ruby.exe" "%~dpn0" %*
@ayr-ton
ayr-ton / .nvmrc
Last active April 4, 2016 23:51
Blinking lights
0.10
@ayr-ton
ayr-ton / docker-compose.yml
Last active August 29, 2015 14:22
Playbooks for install all my docker gadgets
---
- hosts: '{{ hosts }}'
sudo: yes
tasks:
- name: Install curl
apt: pkg=curl state=latest update_cache=yes
- name: Install docker-compose
shell: curl -L https://github.com/docker/compose/releases/download/1.3.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-slider/paper-slider.html">
<polymer-element name="my-element">
<template>
<style>
:host {