Skip to content

Instantly share code, notes, and snippets.

@zerobytes
zerobytes / touchEvents.js
Last active May 14, 2024 02:44
Touch Enter and Touch Leave Event - Javascript
let onTouchLeaveEvents = [];
let onTouchEnterEvents = [];
const onTouchEnter = function (selector, fn) {
onTouchEnterEvents.push([selector, fn]);
return function () {
onTouchEnterEvents.slice().map(function (e, i) {
if (e[0] === selector && e[1] === fn) {
onTouchEnterEvents.splice(1, i);
}
});
@CharlieScarver
CharlieScarver / AdventureTime.csv
Last active May 14, 2024 02:43 — forked from austinpray/AdventureTime.csv
List of important adventure time episodes
Season Episode Title Reason
1 5 The Enchiridion A good intro to the series, plus introduces the important Enchiridion
1 2 Trouble in Lumpy Space* Introduces LSP (episode out of order)
1 3 Prisoners of Love Introduces Ice King and his obsession (episode out of order)
1 7 Ricardio the Heart Guy Finn and PB development, Sets a returning plot
1 8 Business Time* First mention of Ooo being post-apocalyptic
1 9 My Two Favorite People Intros the Jake and Lady Rainicorn plotline
1 10 Memories of Boom Boom Mountain A look at how Finn was adopted into Jake's Family
1 12 Evicted! Intros Marceline
@macocci7
macocci7 / takeScreenshotAndHtmlOfSelectedNode.php
Last active May 14, 2024 02:41
chrome-php/chrome 指定要素のみのスクリーンショット&HTML取得 (Taking Screenshot and Html of Selected Node)
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use HeadlessChromium\BrowserFactory;
use HeadlessChromium\Clip;
use HeadlessChromium\Dom\Dom;
use HeadlessChromium\Dom\Selector\CssSelector;
use HeadlessChromium\Page;
use headlessChromium\Utils;
@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@mangalaman93
mangalaman93 / sysserver.go
Last active May 14, 2024 02:39
setting low level socket options in golang (SO_PRIORITY, SO_REUSEADDR)
package main
import (
"bufio"
"fmt"
"net"
"os"
"syscall"
)
@lbruder
lbruder / lbForth.c
Created April 6, 2014 15:21
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@rxaviers
rxaviers / gist:7360908
Last active May 14, 2024 02:35
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@paulrouget
paulrouget / ff.md
Last active May 14, 2024 02:30
Hacking Firefox
@PhirePhly
PhirePhly / ISA.txt
Created March 26, 2012 20:42
Intro to the ISA bus by Mark Sokos
THE ISA AND PC/104 BUS
IBM, IBM/XT, IBM PC, and IBM PC AT are registered trademarks of
International Business Machines Corporation.
This file is designed to give a basic overview of the bus found in
most IBM clone computers, often referred to as the XT or AT bus. The
AT version of the bus is upwardly compatible, which means that cards
@marceloandrader
marceloandrader / callbacks.js
Last active May 14, 2024 02:29
Functions are objects
// you can create a function by passing the
// Function constructor a string of code
var func_multiply = new Function("arg1", "arg2", "return arg1 * arg2;");
func_multiply(5,10); // => 50