Skip to content

Instantly share code, notes, and snippets.

View kt3k's full-sized avatar

Yoshiya Hinosawa kt3k

View GitHub Profile
@mmastrac
mmastrac / debugme.ts
Created April 4, 2024 16:07
Debug current deno
let c = new Deno.Command("code", {args:["--open-url", `vscode://vadimcn.vscode-lldb/launch/config?{'request':'attach','pid':${Deno.pid}}`]}).spawn();
@OrionReed
OrionReed / dom3d.js
Last active November 16, 2024 13:18
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@Kycermann
Kycermann / storybro.js
Created June 14, 2023 17:45
Storybro - Deno KV Hackathon Entry
import { serve, json, validateRequest } from "https://deno.land/x/[email protected]/mod.ts";
import { InteractionResponseTypes, InteractionTypes, createBot } from "https://deno.land/x/[email protected]/mod.ts";
import nacl from "https://cdn.skypack.dev/[email protected]?dts";
import { withSafeAtomics } from "https://deno.land/x/[email protected]/mod.ts";
// Try it out here: https://discord.gg/5nBCAa45
const kv = withSafeAtomics(await Deno.openKv());
serve({
@thosakwe
thosakwe / about-me.md
Last active July 19, 2020 10:00
About Me
@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active August 12, 2024 13:00
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@blaisep
blaisep / jenkins-pipeline-git-cred.md
Created October 20, 2016 23:33
Insert git credentials into Jenkins Pipeline Script projects

Suppose you want to inject a credential into a Pipeline script. The cloudbees note does not include Pipeline script examples. https://support.cloudbees.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs

The Jenkins Pipeline Docs' description of the git pushmethod doesn't have an example using injected credentials. (https://jenkins.io/doc/pipeline/examples/#push-git-repo)

The Snippet generator is helpful, but not not if you try to follow the instructions at: https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Binding+Plugin

@tompng
tompng / block_quine.rb
Last active October 6, 2024 01:03
ブロック崩しQuine 左右キーかadキーで移動 spaceで一時停止 ファイルに保存するとその状態から再開できるよ
s=%w(ABCDEFGHIJKMNOQRSUWXYZ0123456789 "`^' acegmnopqrsuwxyz)########################################
b='';d=->c{(w=s.find{|a|a[c]})&&(b+=(w.size+w.index(c)).to_s(2)[1..-1])};%(#########################
B^"`^^```^""NB^"`^^```^""NBS4K2DANGSGDJXANGWGDJDBYUS4I2OENGWGDJD""'`"^"'""'J"`^"`^^`"`^DJ"`^"`^^`"`^
D mqwgmqwa anawoqom NOGGS24NNUZ6YX1BJAWC2IUKE21CCKJFFYZWQM wsereues Z pnaxmxex aomoeooo
C 3MDN7SQJ 2BCEA37Q IBEG24XQOOX082HI6X0QZ51B7HW8WUIE7JYQZ4 ME7JSE6W M RO7GG835 N77U0Y5W
F BDZ6UK1K OMZGQU5K O5WSFIME7JYGE34HOJ1Q525RO7SQ54HD2RGKFI UJE6XYJ4 D Q6FDEMXX KNM0GWW9
M 6YH4448A 2YH4Z24R Y3UY9MDM27Y0G3IRYXUY9JDM27Y0G3IRZBZ60U 8O6YH4J4 8 OYDDYZS4 A27FNGSG
D `"""'"` xa "'"'"'" 1JIRYUZ65M7E7QWS13IRYZSE1SCMI9G8KCDM3Xg ``""``" 9 ``^^'`` en `^`"^^`
7F NQSGcsooosasp444WQ3FHY7U4A2OH443IRY3Z6DU4C7FZ0Y5HHI3U0 S21 RZOY G
B xuwpxew "8H3IN27BQW45KOXXY04DA71U8W4RD6YA8GWRM2FE0D5KA27FNW^ psaycsa Y roryxma '" pmswrmz
@soundyogi
soundyogi / 2018_chrome_snippet_gui_import_export.js
Last active December 24, 2023 22:09
A snippet to export and import your chrome snippets
void function() { "use strict"
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WIP DO NOT USE WIP !!!!!!!!!!!!!!!!!!!!!
DO NOT USE THIS YET.
USE THE 2016 VERSION BELOW PLEASE.
WWWWWWWW WWWWWWWWIIIIIIIIIIPPPPPPPPPPPPPPPPP
W::::::W W::::::WI::::::::IP::::::::::::::::P
W::::::W W::::::WI::::::::IP::::::PPPPPP:::::P
@lukescott
lukescott / gist:36453a75c39c539f5c7d
Last active February 12, 2024 00:00
Traits in ES6 now
/*
var Trait1 = {
method1() {}
};
var Trait2 = {
method2() {}
};
var Trait3 = mixin({
@benjamingr
benjamingr / gist:0237932cee84712951a2
Last active October 6, 2023 08:31
Promise unhandled rejection tracking global handler hook

Possibly Unhandled Rejection NodeJS Promise Hook

###Unhandled Rejection Tracking

Several promise libraries such as bluebird and when as well as some native promise implementations offer potentially unhandled rejection tracking. This means that the following:

Promise.reject(new Error("err")); // never attach a `catch`