Skip to content

Instantly share code, notes, and snippets.

View altbdoor's full-sized avatar
🐵

Ng Han Seng altbdoor

🐵
  • Kuala Lumpur, Malaysia
  • 12:08 (UTC +08:00)
View GitHub Profile
@Druah
Druah / Emotes.md
Last active May 5, 2024 02:47
How to Enable 7TV, BetterTTV, and FrankerFaceZ Emotes for Newbs

This guide is slightly deprecated as V3 of 7TV's browser add-on now supports 7TV, BetterTTV, and FrankerFaceZ emotes out of the box, and has some great quality of life chat features that are currently not found in any other emote add-on. You should consider going to 7TV's website and downloading their browser add-on from there.

What even is this? FeelsDankMan

7TV, BetterTTV, and FrankerFaceZ, more commonly stylized as 7TV, BTTV, and FFZ, are 3rd party emote services for Twitch chat, which aim to enhance a viewer's chatting experience on Twitch by allowing for more emotes to be used in chat, free of charge. Think of it like Discord emojis.

If you're wondering what those weird phrases people in chat seem to be spamming are, it's probably an emote from one of the above mentioned 3rd party emote servi

@super3
super3 / readme.md
Last active July 21, 2020 11:03 — forked from jimmywarting/readme.md
Cors Proxies
Server SSL Metods Server country code Comments
[YaCDN][1] GET EU Unlimited size and unlimited requests (for now)
[crossorigin.me][2] GET US Require Origin header
2MB size limit
[cors-proxy.htmldriven][3] - CZ JSON response
don't work well with binary
[cors-proxy.taskcluster][4] POST US Only witelisted to taskcluster.net
Can send any header/method
[thingproxy][9] ANY US Limited to 100kb for both upload and download, max 10 req/sec
[whateverorigin][10] GET US Only supports JSONP
[cors.io][11] GET, HEAD US Only supports GET and HEAD request
[gobetween][12] GET US Only supports GET requests
@imolorhe
imolorhe / pdf2img.html
Created August 13, 2018 09:38 — forked from jdeng/pdf2img.html
pdf to image using pdf.js
<html>
<body>
<script type="text/javascript" src="//mozilla.github.io/pdf.js/build/pdf.js"></script>
<script type="text/javascript">
var url = "https://docs.google.com/document/export?format=pdf&id=1ML11ZyyMpnAr6clIAwWrXD53pQgNR-DppMYwt9XvE6s&token=AC4w5Vg7fSWH1Hq0SgNckx4YCvnGPaScyw%3A1423618416864";
var pages = [], heights = [], width = 0, height = 0, currentPage = 1;
var scale = 1.5;
function draw() {
@metanav
metanav / enterZone.ts
Last active August 8, 2019 01:54
A RxJS pipeable operator which let the observables to enter into angular zone so that the change detection works properly.
import { NgZone } from '@angular/core';
import { Observable } from 'rxjs/Observable';
export function enterZone(zone: NgZone) {
return <T>(source: Observable<T>) =>
new Observable<T>(observer =>
source.subscribe({
next: (x) => zone.run(() => observer.next(x)),
error: (err) => observer.error(err),
complete: () => observer.complete()
@davej
davej / fetch-timeout.js
Last active July 1, 2022 23:35
Add a pseudo timeout/deadline to a request using the ES6 fetch api
Promise.race([
fetch('/foo'),
new Promise((_, reject) =>
setTimeout(() => reject(new Error('Timeout')), 7000)
)
]);

The issue:

..mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.

(from a new defunct https://developers.google.com/mobile/articles/fast_buttons article)

touch-action CSS property can be used to disable this behaviour.

touch-action: manipulation The user agent may consider touches that begin on the element only for the purposes of scrolling and continuous zooming. Any additional behaviors supported by auto are out of scope for this specification.

@max-mapper
max-mapper / readme.md
Last active March 16, 2023 15:18
Video stabilization using VidStab and FFMPEG (Mac OS X)

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Here's an example video I made

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab
@edokeh
edokeh / index.js
Last active May 12, 2024 05:54
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
// Created by STRd6
// MIT License
// jquery.paste_image_reader.js
(function($) {
var defaults;
$.event.fix = (function(originalFix) {
return function(event) {
event = originalFix.apply(this, arguments);
if (event.type.indexOf('copy') === 0 || event.type.indexOf('paste') === 0) {
event.clipboardData = event.originalEvent.clipboardData;
@nakagami
nakagami / pilview.py
Last active March 2, 2023 23:58
Image viewer by PIL and TK
#!/usr/bin/env python
##############################################################################
# Copyright (c) 2012 Hajime Nakagami<nakagami@gmail.com>
# All rights reserved.
# Licensed under the New BSD License
# (http://www.freebsd.org/copyright/freebsd-license.html)
#
# A image viewer. Require Pillow ( https://pypi.python.org/pypi/Pillow/ ).
##############################################################################
import PIL.Image