Skip to content

Instantly share code, notes, and snippets.

View iGallina's full-sized avatar

iGallina iGallina

  • Brasília -DF
View GitHub Profile
@iGallina
iGallina / export-toby.js
Created August 5, 2019 19:20 — forked from krishpop/export-toby.js
Export Toby
// code courtesy of Toby team
chrome.storage.local.get("state", o => (
((f, t) => {
let e = document.createElement("a");
e.setAttribute("href", `data:text/plain;charset=utf-8,${encodeURIComponent(t)}`);
e.setAttribute("download", f);
e.click();
})(`TobyBackup${Date.now()}.json`, o.state)
));
@iGallina
iGallina / sei_extract.user.js
Last active April 19, 2016 19:37 — forked from djyde/rm2magnet1024.user.js
sei_extract.user.js
// ==UserScript==
// @name rm2mag1024
// @namespace http://djyde.github.io/
// @version 0.1.1
// @description Automatically convert rmdown to magnet and show on the top of 1024 page
// @author Randy
// @match http://t66y.com/htm_data/*
// @grant none
// ==/UserScript==
@iGallina
iGallina / rvm2rbenv.txt
Last active March 6, 2016 18:05 — forked from brentertz/rvm2rbenv.txt
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@iGallina
iGallina / user.rb
Created September 25, 2015 23:50
ActiveAdmin example
ActiveAdmin.register User do
index do
column "Nome", :name
column "CPF", :cpf
column "Login", :login
column "Setor no MC", :sector_mc
column "Login da Anatel", :anatel_status do
status_tag 'ATIVO'
@iGallina
iGallina / sei_extractor.js
Created September 4, 2014 19:04
SEI_extractor
var resultado = '';
$.each($('tr.infraTrClara'), function () {
// Atribuição
var proc_atribuido = '';
proc_atribuido = ($(this).children('td:last').text().trim() === "") ? '(sem alocação)' : $(this).children('td:last').text();
// Processo
var processo = $(this).children('td:nth-child(3)').find('a');
var m_over = $(processo).attr('onmouseover');
@iGallina
iGallina / SEI_jquery_extract
Last active August 29, 2015 14:05
Little JS code to be used with jQuery Injection (Chrome Plugin) to obtain data from badly programmed software.
var string = ''
$.each($('tr.infraTrClara'), function(){
var nome = $(this).children('td:last')
var link = $(this).children('td:nth-child(3)').select('a')
var content = link.attr('onmouseover')
string = string + '\n ' + nome.text() + ':' + link.text() + ':' + content
})
string
function simulatedClick(target, options) {
var event = target.ownerDocument.createEvent('MouseEvents'),
options = options || {};
//Set your default options to the right of ||
var opts = {
type: options.type || 'click',
canBubble:options.canBubble || true,
cancelable:options.cancelable || true,