Skip to content

Instantly share code, notes, and snippets.

View Hootrix's full-sized avatar
💭
I may be slow to respond.

Pang Hootrix

💭
I may be slow to respond.
View GitHub Profile
@codler
codler / gist:3906826
Created October 17, 2012 17:18
Support HTTP Header Range, mp4, php.php/mp4.mp4
<?php
# Nginx don't have PATH_INFO
if (!isset($_SERVER['PATH_INFO'])) {
$_SERVER['PATH_INFO'] = substr($_SERVER["ORIG_SCRIPT_FILENAME"], strlen($_SERVER["SCRIPT_FILENAME"]));
}
$request = substr($_SERVER['PATH_INFO'], 1);
$file = $request;
$fp = @fopen($file, 'rb');
@HintikkaKimmo
HintikkaKimmo / who_data.py
Created February 21, 2017 06:10
handy way to read csv files with unknown csv dialect
import csv
import pprint
# opens csv file and assingns it to an object
with open('data-text.csv') as csvfile:
# Use Sniffer to figure out csv dialect
dialect = csv.Sniffer().sniff(csvfile.read(1024))
csvfile.seek(0)
# pass the dialect to filereader to read the file
reader = csv.reader(csvfile, dialect)
@oliveratgithub
oliveratgithub / emojis.json
Last active March 25, 2024 16:37
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "&#128104;&zwj;&#128105;&z
@T-Rave
T-Rave / alfred-clipboard-dump.sh
Last active June 1, 2023 20:53
Alfred, Mac OS X app, full clipboard dump to text file
## Must have sqlite3 installed. Homebrew user? brew install sqlite
## Can be ran directly in command line and will place file directory where ran
## Remove `-header` if you don't want the output to have the column name `item`
## Checkout more options and Workflow - https://github.com/T-Rave/alfred-clipboard-dump
# dumps output with list option since single column. Produces cleaner data without double quotes
sqlite3 -header -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard;" > clipboard-dump.txt
# dumps full table to csv format
sqlite3 -header -csv ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT * FROM clipboard;" > clipboard-dump.csv
# dumps only items in descending (inverse) order with no column name
sqlite3 -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard ORDER BY item DESC;" > clipdump.txt
@ruanyf
ruanyf / mtr.css
Created March 16, 2019 11:23
mtr.css: Hong Kong MTR station colors http://metrocolor.live/index.html
:root {
--heng-fa-chuen: #b51921;
--tai-koo: #b2103e;
--kowloon-bay: #c41832;
--tseung-kwan-o: #ef342a;
--wui-kai-sha: #a84d18;
--po-lam: #f68f26;
--sai-wan-ho: #faca07;
--disneyland-resort: #07594a;
--skek-kip-mei: #4ba946;
@TheJLifeX
TheJLifeX / 00-hand-gesture-recognition.gif
Last active January 27, 2024 16:05
Simple Hand Gesture Recognition Code - Hand tracking - Mediapipe
00-hand-gesture-recognition.gif
@TheJLifeX
TheJLifeX / 01-README.md
Last active February 22, 2024 19:31
Simple Hand Mouvement Recognition Code - Hand tracking - Mediapipe

Simple Hand Mouvement Recognition Code - Hand tracking - Mediapipe

Goal of this gist is to recognize some simple hand mouvements like Scrolling, Zoom in/out and Slide left/right (see 08-hand-mouvement.gif below).

The whole code for that can be found here: hand-mouvement-recognition-calculator.cc.

You can clone my forked version of mediapipe here: https://github.com/TheJLifeX/mediapipe. I have already commited all code in that repository in the "hand-mouvement-recognition" branch (https://github.com/TheJLifeX/mediapipe/tree/hand-mouvement-recognition).

If you want to know how to recognize hand gesture like ONE, TWO, TREE, FOUR, FIVE, SIX, YEAH, ROCK, SPIDERMAN and OK. You can read this gist: [Simple Hand Gesture Recognition](https://gist.github.com/TheJLifeX/74958cc59db477a91837244ff5