Skip to content

Instantly share code, notes, and snippets.

View anr2me's full-sized avatar

AdamN anr2me

  • localhost
View GitHub Profile
@anr2me
anr2me / mouse_control.py
Created March 24, 2021 08:16 — forked from sheharyarn/mouse_control.py
Control your Mouse using your Eye Movement
import zmq
from pymouse import PyMouse
#mouse setup
m = PyMouse()
x_dim, y_dim = m.screen_size()
#network setup
context = zmq.Context()
socket = context.socket(zmq.SUB)
@anr2me
anr2me / mail.sh
Created March 18, 2021 14:40 — forked from yaasita/mail.sh
blog
#!/usr/bin/expect
set FROM "amazon@example.net"
set TO "amazon@example.net"
set timeout 10
spawn openssl s_client -starttls smtp -crlf -quiet -connect email-smtp.us-east-1.amazonaws.com:587
send "EHLO amazon\n"
expect "250 Ok"
send "AUTH LOGIN\n"

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@anr2me
anr2me / dms.xml
Created October 2, 2020 14:02 — forked from AVGP/dms.xml
UPnP test server (incomplete)
<?xml version="1.0" encoding="utf-8"?>
<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:dlna="urn:schemas-dlna-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<dlna:X_DLNADOC>DMR-1.50</dlna:X_DLNADOC>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<friendlyName>YoloCast</friendlyName>
@anr2me
anr2me / nids.json
Created September 6, 2020 14:56 — forked from minPSVSDK/nids.json
{
"SceAppMgr": {
"nid": 0,
"modules": {
"SceAppMgr": {
"nid": 0,
"kernel": false,
"functions": {
"sceAppMgrAcquireBgmPort": 2949557142,
"sceAppMgrReleaseBgmPort": 4084301367,
@anr2me
anr2me / slim-redux.js
Created August 22, 2019 04:34 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@anr2me
anr2me / OpenVPN Internet Proxy Windows.md
Created March 20, 2019 05:42 — forked from ViRb3/OpenVPN Internet Proxy Windows.md
Create an OpenVPN Windows server that proxies internet traffic
Tested on Windows 10 x64, Anniversary Update
17.09.2017

Set up OpenVPN

  1. Set up an OpenVPN connection following this guide

  2. Generate a TA key and place it in the same folder as the other certificates/keys:

@anr2me
anr2me / GoogleSheetJson.md
Created January 16, 2019 12:26 — forked from ronaldsmartin/GoogleSheetJson.md
Google Spreadsheet JSON Queries

SheetAsJSON + Filtering

This is an extension of DJ Adams' excellent SheetAsJSON Google Apps Script, which provides a way to GET a published Google Spreadsheet as a JSON feed. This version allows generic filtering for terms, more specific control over which rows to parse, and correct MIME type for JSONP output.

Minimal Usage

The following parameters are required for the script to work.

https://script.google.com/macros/s/AKfycbzGvKKUIaqsMuCj7-A2YRhR-f7GZjl4kSxSN1YyLkS01_CfiyE/exec?
+ id=<spreadsheet key>
+ sheet=<sheet name on spreadsheet>
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@anr2me
anr2me / GLSL-Noise.md
Created June 8, 2018 09:50 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}