Skip to content

Instantly share code, notes, and snippets.

View erm3nda's full-sized avatar
😑
Expressionless master

m3nda erm3nda

😑
Expressionless master
  • n0n3
  • localhost
View GitHub Profile
@erm3nda
erm3nda / smartctl.cmd
Created March 11, 2020 03:27
Windows batch with smartctl default process
smartctl -X d: &&
smartctl -s on d:
smartctl -t long d: &&
FOR /L %%N IN () DO smartctl -c d: --json &&
ping localhost -n 60 > nul
@erm3nda
erm3nda / photoviewer.reg
Created February 8, 2020 19:36
Get back the classic default windows photo viewer
Windows Registry Editor Version 5.00
;Holy shit windows that you need to do that fucking shit to simply SHOW something that is already installed. Shame on you fucking Microsoft.
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll]
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell]
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open]
"MuiVerb"="@photoviewer.dll,-3043"
@erm3nda
erm3nda / restoreAffinity.ps1
Last active February 16, 2020 05:49
Sets all processes affinity to half of cores and give ROE High priority #powershell
# elevate privileges if we are not running as Administrator, so we can set affinity of Windows owned processes
# source: http://superuser.com/questions/108207/how-to-run-a-powershell-script-as-administrator
param([switch]$Elevated)
function Test-Admin {
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}
@erm3nda
erm3nda / index.php
Last active January 27, 2020 20:52
Dumping javascript window and navigator variables to screen and to file with PHP
<?php
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
//header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token');
if(isset($_GET["navigator_info"])){
$json_string = json_encode($_REQUEST);
@erm3nda
erm3nda / download-android-ndks-direct-links.sh
Created January 26, 2020 00:56 — forked from ksutcr18/download-android-ndks-direct-links.sh
Download Android NDK Tools / Direct Links
@erm3nda
erm3nda / ebay_remove_articles_with_price_ranges.js
Last active November 13, 2022 10:29
Remove items with combo boxes in Ebay listings
// ==UserScript==
// @name ebay - remove articles with price ranges
// @namespace erm3nda.github.com
// @version 0.1
// @description Remove items with combobox on Ebay listings
// @author erm3nda.github.com
// @match https://www.ebay.es/*
// @match https://www.ebay.ca/*
// @match https://www.ebay.com/*
// @grant none
@erm3nda
erm3nda / headless raspberry setup.md
Created November 27, 2019 08:58
Headless Raspberry Setup

Headless setup for Raspberry, aka Monitorless setup

Because shit happens, and you don't have always a monitor, an usb keyboard, the hmdi adapter, or whatever the fuck fails that day :-)

Connect to wifi automagically

Place wpa_supplicant.conf in sdcard root folder. NOTE THAT THIS ONLY works in the first launch. You'll need to format again sdcard with those changes included.

SSH service

@erm3nda
erm3nda / get_windows_key.vbs
Last active October 30, 2019 15:24
Shows your current Windows key and copies it to clipboard
Set WshShell = CreateObject("WScript.Shell")
return_key = ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
MsgBox return_key
Set oExec = WshShell.Exec("clip")
Set oIn = oExec.stdIn
oIn.Write return_key
oIn.Close
@erm3nda
erm3nda / gmail_imap_read
Last active October 19, 2019 23:19
read gmail imap email
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
import imaplib
import email
import datetime
import re
def process_mailbox(M):
@erm3nda
erm3nda / install_opencv.sh
Created August 6, 2019 20:19
Install opencv in Ubuntu or Debian
######################################
# INSTALL OPENCV ON UBUNTU OR DEBIAN #
######################################
# | THIS SCRIPT IS TESTED CORRECTLY ON |
# |------------------------------------------------------|
# | OS | OpenCV | Test | Last test |
# |------------------|--------------|------|-------------|
# | Ubuntu 18.04 LTS | OpenCV 3.4.2 | OK | 18 Jul 2018 |
# | Debian 9.5 | OpenCV 3.4.2 | OK | 18 Jul 2018 |