Skip to content

Instantly share code, notes, and snippets.

😑
Expressionless master

m3nda erm3nda

😑
Expressionless master
Block or report user

Report or block erm3nda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@erm3nda
erm3nda / index.php
Last active Jan 27, 2020
Dumping javascript window and navigator variables to screen and to file with PHP
View index.php
<?php
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
//header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Credentials: true");
header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS');
header('Access-Control-Max-Age: 1000');
header('Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token , Authorization');
// store data into a JSON nice format
View download-android-ndks-direct-links.sh
@erm3nda
erm3nda / ebay_remove_articles_with_price_ranges.js
Last active Dec 21, 2019
Remove items with combo boxes in Ebay listings
View ebay_remove_articles_with_price_ranges.js
// ==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
View headless raspberry setup.md

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 Oct 30, 2019
Shows your current Windows key and copies it to clipboard
View get_windows_key.vbs
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 Oct 19, 2019
read gmail imap email
View gmail_imap_read
#!/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 Aug 6, 2019
Install opencv in Ubuntu or Debian
View install_opencv.sh
######################################
# 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 |
@erm3nda
erm3nda / source_to_pdf.sh
Created Jul 26, 2019
Convert source code files to single PDF with all code
View source_to_pdf.sh
#!/bin/bash
### this script needs:
### python module pygmentize, wkhtmltopdf and ghostscript
### works for any source code, just modify -l python, and any .py reference to your choice
# Change this to the repository directory
REPOSITORY=$1
# Iterate over the repository
@erm3nda
erm3nda / reboot_to_linux.cmd
Last active Dec 21, 2019
Windows reboot to Linux using grub.bak file
View reboot_to_linux.cmd
@echo off
:: This program needs the following things to work
:: sed with some dll dependancies -> https://mega.nz/#!IRY0hCCK!tV5vZd3rsmTf6ZCrx-JfP8MpN9ztYfDHxtXVdDBbtbw
:: LinuxFS by Paragon -> http://dl.paragon-software.com/demo/linuxwin_trial.msi :: Trial just slow down speed, is OK for us
:: You have to boot into Linux and save current grubenv as grubenv.bak, otherwise grub will load saved one
"C:\Program Files (x86)\Paragon Software\LinuxFS for Windows\extmounter" /mount disk1 D:
@erm3nda
erm3nda / rebootw_to_windows.sh
Last active Jul 16, 2019
Reboot Linux and start custom entry from GRUB menu one-time
View rebootw_to_windows.sh
#!/bin/bash
# read your current table running `efibootmgr`
# set index 0001 as next_entry, check yours
efibootmgr -n 0001
reboot
You can’t perform that action at this time.