Skip to content

Instantly share code, notes, and snippets.

@Lomanic
Lomanic / README.md
Last active May 5, 2016 13:03 — forked from nikcub/README.md
Twitter refined Greasemonkey / user script

Chrome install - drag + drop onto extensions window at chrome://extensions

@Lomanic
Lomanic / URL to QR Bookmarklet
Last active July 16, 2016 14:05
URL to QR Bookmarklet - jQuery
javascript:(function(){var newDiv=document.createElement("div");newDiv.setAttribute('id','qrcodeonfly');newDiv.innerHTML='<div style="position:fixed;top:50%;left:50%;z-index:99999;width:550px;height:550px;margin-top:-275px;margin-left:-275px;background-color:#fff;padding:49px;border:1px%20solid #ccc;box-shadow:0 0 20px rgba(0,0,0,0.3);"><img src="http://chart.apis.google.com/chart?cht=qr&chs=545x545&choe=UTF-8&chld=H&chl='+window.location+'"/><a href="javascript:(function(){document.body.removeChild(document.getElementById(\'qrcodeonfly\'));})()" style="display:block;position:absolute;top:-7px;right:-7px;color:#eee;font-family:verdana;font-size:18px;width:14px;height:14px;line-height:10px;text-align:center;cursor:pointer;font-weight:bold;background:#000;padding:3px;text-decoration:none;border:solid 3px white;border-radius:50%;box-shadow:0 0 5px rgba(0,0,0,0.5);">x</a></div>';document.body.appendChild(newDiv);})()
@Lomanic
Lomanic / Google_Lucky_Button_Fix.user.js
Last active November 17, 2016 10:00 — forked from stcruy/Google_Lucky_Button_Fix.user.js
Google Lucky Button Fix - Greasemonkey script
// ==UserScript==
// @name Google Lucky Button Fix
// @namespace -
// @version 2
// @description On Google search result pages that have "&btnI" in the url, automatically redirect to the first hit.
// @include /^https?:\/\/(?:encrypted|www)\.google\.[^/]+\/(?:$|[#?]|search|webhp).*&btnI.*/
// @grant none
// ==/UserScript==
var firstLink = document.querySelector("#search .rc a").href;
window.location.replace(firstLink);
@echo off
net session >nul 2>&1
if %ERRORLEVEL% NEQ 0 ( echo Run this script with administrator privileges & exit /B 1 )
:: https://gist.github.com/Albirew/613cbf63595647ff26b269d5271871a0
echo +------------------------------------------------------------------+
echo ^| SMBv1 patch against malwares like WannaCry ou notPetya / Petwrap ^|
echo +------------------------------------------------------------------+
echo.
:: deactivate SMBv1 on SMB server
reg add "HKLM\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters" /v SMB1 /t REG_DWORD /d 0 /f
package main
import (
"github.com/AllenDang/w32"
"io"
"os"
"unsafe"
"errors"
"fmt"
"syscall"
@Lomanic
Lomanic / open_process.go
Created November 12, 2017 16:46 — forked from castaneai/open_process.go
WinAPI OpenProcess in Golang
package main
import (
"fmt"
"syscall"
"unsafe"
)
type Process uintptr
31683AD77BFC47A1D1A4F30959FDDE26|0001 - Electroplankton (Japan).nds
4E24E5D333A91F948265A177B2FF9DB2|0001 - Electroplankton (Japan) (1).nds
283631768B2213227FBBEE91154C688F|0002 - Need for Speed - Underground 2 (USA) (En,Fr,De,Es,It).nds
C7B2F7A5861F7D4BC94FF050D0B4FBD0|0002 - Need for Speed - Underground 2 (USA) (En,Fr,De,Es,It) (1).nds
D57CB3335F228F3DB869003766D10970|0002 - Need for Speed - Underground 2 (USA) (En,Fr,De,Es,It) (2).nds
C8065C4B4A21337C2928A14973218D26|0003 - Yoshi Touch & Go (USA).nds
827CBAB11FB04D1C87389077CB5809BE|0003 - Yoshi Touch & Go (USA) (1).nds
90C6F561CAFB5EDE611398E2F5CA88BD|0003 - Yoshi Touch & Go (USA) (2).nds
6796156F49B5ED663EF986B379FFD4EA|0003 - Yoshi Touch & Go (USA) (3).nds
FD920DBC37C332D392B547B1D7D5839D|0004 - Feel the Magic - XY-XX (USA) (En,Ja).nds
@Lomanic
Lomanic / common.sh
Created February 13, 2018 15:16 — forked from jeckel/common.sh
Common bash functions
#!/bin/bash
# ----------------------------------------------------------
# Define common colors and styles
#
readonly RED='\033[0;31m'
readonly GREEN='\033[0;32m'
readonly ORANGE='\033[0;33m'
readonly BLUE='\033[0;34m'
readonly PURPLE='\033[0;35m'
@Lomanic
Lomanic / utmstrip.user.js
Last active November 7, 2018 23:08 — forked from paulirish/utmstrip.user.js
userscript: Drop the UTM params from a URL when the page loads
// ==UserScript==
// @name UTM param stripper
// @author Paul Irish, Sam Hasler, Lomanic
// @namespace http://github.com/paulirish
// @version 1.3
// @description Drop the UTM params from a URL when the page loads.
// @extra Cuz you know they're all ugly n shit.
// @include /^http.*\?.*[?&]utm_.*$/
// @run-at document-start
// @updateURL https://gist.github.com/Lomanic/cf1158a9bfb90d8b5dbbb4d05483e857/raw/utmstrip.user.js
@Lomanic
Lomanic / send-magic-packet.sh
Last active June 21, 2019 17:18 — forked from SteveMarshall/send-magic-packet.sh
Wake-On-Lan Magic Packet using netcat in bash
#!/usr/bin/env bash
mac_address=$1
# Strip colons from the MAC address
mac_address=$(echo $mac_address | sed 's/://g')
broadcast=$2
port=4343
# Magic packets consist of 12*`f` followed by 16 repetitions of the MAC address