Skip to content

Instantly share code, notes, and snippets.

filters:
- enabled: true
url: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt
name: AdGuard DNS filter
id: 1
- enabled: true
url: https://adaway.org/hosts.txt
name: AdAway
id: 2
- enabled: true
@Haraguroicha
Haraguroicha / pve-fat-finger-fuckoff.js
Created July 30, 2019 13:45
prevent fat finger shutdown the host
(() => {
const targetNode = document.getElementById('content');
const config = { attributes: false, childList: true, subtree: true };
const callback = function(mutationsList, observer) {
for(let mutation of mutationsList) {
if (mutation.type === 'childList') {
(() => {
const a = document.querySelector('[id^="proxmoxButton"] span[data-ref="btnIconEl"].fa-power-off');
if (!!a) {
const b = a.parentElement.parentElement.parentElement;
var list64 = ['rax', 'rcx', 'rdx', 'rbx', 'rsp', 'rbp', 'rsi', 'rdi']
var list32 = ['eax', 'ecx', 'edx', 'ebx', 'esp', 'ebp', 'esi', 'edi']
var list16 = ['ax', 'cx', 'dx', 'bx', 'sp', 'bp', 'si', 'di']
var list8 = ['al', 'cl', 'dl', 'bl', 'spl', 'bpl', 'sil', 'dil']
// function for extend op code list from one to manys
function extend_op(o) {
var new_op_codes = []
// only extend when `extend_set` not null
if (o.extend_set != null) {
@Haraguroicha
Haraguroicha / libimobiledevice.rb
Created August 2, 2017 16:47
Library to communicate with iOS devices natively (enable debug code)
class Libimobiledevice < Formula
desc "Library to communicate with iOS devices natively"
homepage "http://www.libimobiledevice.org/"
url "http://www.libimobiledevice.org/downloads/libimobiledevice-1.2.0.tar.bz2"
sha256 "786b0de0875053bf61b5531a86ae8119e320edab724fc62fe2150cc931f11037"
revision 2
bottle do
cellar :any
sha256 "7440711e4b0b3c52a1b543b770b18de751a362086419ded9310f55fe104f546f" => :sierra
@Haraguroicha
Haraguroicha / convert-bands.sh
Created April 7, 2017 17:38
Convert sparsebundle bands size
#!/bin/bash
IFS=$'\n'
bMB=1024 # default is 8MB each size, I'm use 1GB each size, also recommend at lease 128MB each size
sbs=$(($bMB * 2 * 1024))
function hdc {
mv $1 temp.sparsebundle
hdiutil convert temp.sparsebundle -format UDSB -tgtimagekey sparse-band-size=$sbs -o $1
@Haraguroicha
Haraguroicha / keybase.md
Created March 1, 2017 09:44
keybase.md

Keybase proof

I hereby claim:

  • I am Haraguroicha on github.
  • I am haraguroicha (https://keybase.io/haraguroicha) on keybase.
  • I have a public key whose fingerprint is CAD8 6F03 43C9 C029 55C0 A350 BF78 E2BA A686 44F0

To claim this, I am signing this object:

@Haraguroicha
Haraguroicha / openssl.rb
Last active December 21, 2016 06:19
OpenSSL Homebrew brew formula that allows additional configuration via env var CONFIGURE_OPTS
require "formula"
class Openssl < Formula
homepage "http://openssl.org"
version v="1.0.2j"
url "https://www.openssl.org/source/openssl-#{v}.tar.gz"
mirror "https://dl.bintray.com/homebrew/mirror/openssl-#{v}.tar.gz"
mirror "http://fossies.org/linux/misc/openssl-#{v}.tar.gz"
mirror "https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-#{v}.tar.gz"
sha256 "e7aff292be21c259c6af26469c7a9b3ba26e9abaaffd325e3dccc9785256c431"
@Haraguroicha
Haraguroicha / getWiFiInfo.m
Created April 27, 2016 08:58
Get WiFi Info from private api
@import SystemConfiguration;
#import <dlfcn.h>
#import <mach/port.h>
#import <mach/kern_return.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
#include <net/if.h>
#include <net/if_dl.h>
@Haraguroicha
Haraguroicha / showModalDialog.js
Created March 23, 2016 01:03
alternative function of showModalDialog for Chrome
///========================================
/// showModalDialog.js
///
/// Created by Haraguroicha 2014-10-06
///========================================
(function() {
window._smdName = window._smdName || Math.round(Math.random() * 1000000000);
window.spawn = window.spawn || function(gen) {
function continuer(verb, arg) {
var result;
@echo off
for /f "delims=^" %%a in ('dir /a-d /b /s "C:\Program Files\ospp.vbs" "C:\Program Files (x86)\ospp.vbs" 2^> nul ^| findstr /i vbs') do set ospp=cscript "%%a"
%ospp% %*