Skip to content

Instantly share code, notes, and snippets.

View andrewaguiar's full-sized avatar
😎
🇧🇷🏋️‍♂️💻🐼✈️

Andrew S Aguiar andrewaguiar

😎
🇧🇷🏋️‍♂️💻🐼✈️
View GitHub Profile
@andrewaguiar
andrewaguiar / vanilla.js
Last active November 24, 2020 00:00
Bunch of useful shortcuts to work with vanilla js
// Usage:
//
// ajax({
// url: 'users',
// method: 'POST',
// data: JSON.stringify(user),
// headers: {
// 'Content-Type': 'application/json',
// },
# frozen_string_literal: true
source 'https://rubygems.org'
ruby '2.5.0'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
"https://github.com/#{repo_name}.git"
end
@andrewaguiar
andrewaguiar / README.md
Last active December 5, 2019 12:39
A Chrome / Brave extension that changes user agent dinamically and tries to prevent browser fingerprinting

Anox

A Chrome / Brave extension that changes user agent dinamically and tries to prevent browser fingerprinting.

Tested with https://www.nothingprivate.ml/

Installing

mkdir ~/anox && \
# Implementation of the algorithm for the RSLP Stemmer which was presented by the paper
# 'A Stemming Algorithm for the Portuguese Language'.
#
# In Proceedings of the SPIRE Conference, Laguna de San Raphael, Chile, November 13-15, 2001,
# written by Viviane Moreira Orengo and Christian Huyck.
#
# More info: http://www.inf.ufrgs.br/~viviane/rslp/index.htm
# Datasets got from: https://www.kaggle.com/nltkdata/rslp-stemmer
#
class PortugueseStemmer
@andrewaguiar
andrewaguiar / tachyons_form_builder.rb
Last active October 17, 2019 04:09
A FormBuilder based on tachyons with (trix editor, toggle, react support and more)
# frozen_string_literal: true
class TachyonsFormBuilder < ActionView::Helpers::FormBuilder
include ActionView::Helpers::TagHelper
include ActionView::Context
include React::Rails::ViewHelper
def input_classes
'input-reset ba b--black-40 pa3 mt2 mb3 db w-100 f5 dark-gray'
end
# base service boilerplace module
module Service
module Base
def self.call(*args)
new.call(*args)
end
end
end
@andrewaguiar
andrewaguiar / organize_flicker_data_import.rb
Created February 7, 2019 10:35
Organizes the data import of Flicker
# Organizes the data import of Flicker
# 1 - Download all files
# 2 - Unzip them in a folder
# 3 - Run this script inside the folder
# 4 - Bingo, photos will be placed inside build/ organized by albums
require 'json'
require 'fileutils'