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
@tylerneylon
tylerneylon / learn.lua
Last active May 16, 2024 05:47
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
@branneman
branneman / better-nodejs-require-paths.md
Last active June 12, 2024 02:40
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

@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:

@gokulkrishh
gokulkrishh / media-query.css
Last active June 7, 2024 05:36
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@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
@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>
@Tras2
Tras2 / cloudflare-ddns-update.sh
Last active May 31, 2024 11:55
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
@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.
@jakub-g
jakub-g / async-defer-module.md
Last active June 4, 2024 19:24
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)