Skip to content

Instantly share code, notes, and snippets.

View seia-soto's full-sized avatar
💭
Often in flight

HoJeong Go seia-soto

💭
Often in flight
View GitHub Profile
@qwerty12
qwerty12 / ATKMediaInterceptor.c
Created November 18, 2012 14:44
Butchered version of zaak404's ATKMediaInterceptor for global media keys support
#include <windows.h>
#ifndef VK_MEDIA_NEXT_TRACK
#define VK_MEDIA_NEXT_TRACK 0xB0
#endif
#ifndef VK_MEDIA_PREV_TRACK
#define VK_MEDIA_PREV_TRACK 0xB1
#endif
#ifndef VK_MEDIA_STOP
#define VK_MEDIA_STOP 0xB2
@broedli
broedli / dehydrated.md
Last active December 20, 2021 14:10
tut on dehydrated

Installing dehydrated for Let's Encrypt certificates

This tutorial will show you how to install the Let's Encrypt ACME client dehydrated.

Installing dehydrated

To install dehydrated we simply clone it's repository:

git clone https://github.com/lukas2511/dehydrated.git /opt/dehydrated
@srstsavage
srstsavage / nginx_google_analytics
Last active June 6, 2023 22:50
google analytics in nginx
# send logs for all traffic (including non-html) to google analytics
#
# in server block:
# set $google_analytics_id "UA-THECORRECT-ID";
# include /srv/nginx/google_analytics;
#
# in location blocks:
# post_action @ga;
#
# notes: post_action has been referred to by nginx devs as a "dirty hack" and this approach may stop working one day.
// ==UserScript==
// @name Open YouTube App
// @version 1.0.2
// @author asportnoy
// @match *://*.youtube.com/*
// @downloadURL https://gist.github.com/asportnoy/628b820184297f5fe296c1a5b79c8000/raw/open-youtube-app.user.js
// @updateURL https://gist.github.com/asportnoy/628b820184297f5fe296c1a5b79c8000/raw/open-youtube-app.user.js
// @homepage https://gist.github.com/asportnoy/628b820184297f5fe296c1a5b79c8000/
// ==/UserScript==
if (window.location.pathname === '/redirect') return;
@bussiere
bussiere / xor.js
Created March 14, 2017 05:21
xor encrypt javascript
// xorEncode.js - Topcat Software LLC. 2011
// bitwise XOR cipher for javascript
// http://www.topcat.hypermart.net/index.html
//
// referencing the script in your HTML:
//
// <html>
// <head>
// <script type="text/javascript" src="xorEncode.js"></script>
// </head>
@Treeki
Treeki / TurnipPrices.cpp
Last active April 5, 2024 13:55
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@hmartiro
hmartiro / zeromq-vs-redis.md
Last active April 14, 2024 20:33
Comparison of ZeroMQ and Redis for a robot control platform

ZeroMQ vs Redis

This document is research for the selection of a communication platform for robot-net.

Goal

The purpose of this component is to enable rapid, reliable, and elegant communication between the various nodes of the network, including controllers, sensors, and actuators (robot drivers). It will act as the core of robot-net to create a standardized infrastructure for robot control.

Requirements:

@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@jakub-g
jakub-g / async-defer-module.md
Last active May 6, 2024 16:18
async scripts, defer scripts, module scripts: explainer, comparison, and gotchas

<script> async, defer, async defer, module, nomodule, src, inline - the cheat sheet

With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.

This document is a comparison of various ways the <script> tags in HTML are processed depending on the attributes set.

If you ever wondered when to use inline <script async type="module"> and when <script nomodule defer src="...">, you're in the good place!

Note that this article is about <script>s inserted in the HTML; the behavior of <script>s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)

@Tras2
Tras2 / cloudflare-ddns-update.sh
Last active May 11, 2024 21:57
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record