Skip to content

Instantly share code, notes, and snippets.

Expressionless master

m3nda erm3nda

Expressionless master
  • n0n3
  • localhost
View GitHub Profile
erm3nda / ssh-persistent-tunnel.service
Created Mar 12, 2021
SSH permanent tunnel service
View ssh-persistent-tunnel.service
#Template SystemD service for a auto healing (reverse) SSH tunnel.
#Place this to /etc/systemd/system/ folder.
#Edit all values inside <>
#Edit the ports, remote user+host, and the key file.
#In the authorized_keys file on the other system, use something like this:
#<restrict,command="echo 'No Commands Allowed.'",port-forwarding,permitopen="localhost:22",permitlisten="localhost:5000">
Description=SSH Persistent Tunnel
erm3nda / steam_launch_params_for_games_without_admin
Created Jan 20, 2021
Run steam game without evelevated privileges
View steam_launch_params_for_games_without_admin
; Steam launch params do not works if you don't include %command%, which represents the original launch arguments, ie: steam://rungameid/391540/
; If you remove the "" quotes and the start, you can't remove original cmd screen. That's why we use cmd + start, when cmd returns start, closes becase /C
cmd /min /C "set __COMPAT_LAYER=RunAsInvoker && start "" %command%"
erm3nda / javascript_bottom_alert.js
Created Oct 12, 2020
Javascript code to detect when we are at bottom of the scroll
View javascript_bottom_alert.js
window.onscroll = function() {
// @var int totalPageHeight
var totalPageHeight = document.body.scrollHeight;
// @var int scrollPoint
var scrollPoint = window.scrollY + window.innerHeight;
// check if we hit the bottom of the page
if(scrollPoint >= totalPageHeight)
erm3nda / universal_blinking_led_arduino_example.ino
Created Aug 18, 2020
Arduino blinking led example but fixed to work also on boards with less PIN, ie attiny85 #arduino #c
View universal_blinking_led_arduino_example.ino
#include <Arduino.h>
// Attiny85 doesn't have nor recognize LED_BUILTIN 13 from Arduino.h
// Little fix to enable led blink with a LED on PIN 3 + GND to test boards.
#define LED_BUILTIN 3
void setup() {
// initialize digital pin LED_BUILTIN as an output.
erm3nda /
Created Aug 6, 2020
This code shows how to create an https interface and listen for queries, then filter and pass them to ipc server running locally #python #mpv
#!/usr/local/env python
# coding: utf8
from flask import Flask, jsonify, request
import os, subprocess
# La creación manual de certificados la reemplazo por ssl_context="adhoc" que está integrado en flask y funciona onthefly
# el problema del adhoc es que genera un nuevo cert cada vez que se lanza, y eso es un rollo si accedemos con un browser, por ejemplo
erm3nda /
Created Aug 6, 2020
This code shows how to create an https bridge with flask that sends json commands from network to json ipc server running locally #python #mpv
#!/usr/local/env python
# coding: utf8
from flask import Flask, jsonify, request, abort
import os, subprocess, json
ASSETS_DIR = os.path.dirname(os.path.abspath(__file__))
app = Flask(__name__)
erm3nda /
Created Jul 24, 2020
Configure touchscreen area of touch device when having dual screen
# configure touchscreen area properly
pointer_id=`xinput | grep ELAN | cut -d " " -f30 | egrep -o '[0-9]{2}'`
xinput map-to-output $pointer_id eDP1
erm3nda / x360 chinesses usb receiver
Created Jul 23, 2020
Como instalar el receptor chino de Xbox 360 wireless en Win10
View x360 chinesses usb receiver
erm3nda /
Last active Jul 22, 2020 — forked from ebuildy/
Setting PHP stream context from system env
echo "auto_prepend_file=/opt/www/proxy.php" >> /etc/php/php.ini
erm3nda / kivy_install.bat
Created Jul 22, 2020
Install Kivy on Windows #python #kivy
View kivy_install.bat
pip install --upgrade pip wheel setuptools
pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
pip install kivy.deps.gstreamer
pip install kivy.deps.angle
pip install kivy