Skip to content

Instantly share code, notes, and snippets.

View maple3142's full-sized avatar

maple maple3142

View GitHub Profile
@psi-4ward
psi-4ward / list-related-posts.js
Last active January 26, 2018 09:39
Hexo related posts by tags
@mmis1000
mmis1000 / brainfuck intepreter.js
Created April 27, 2018 16:05
write brainfuck intepreter with recursion
const recurr = (fn => fn(
(f => f(f))
(self =>
x =>
fn(self(self))(x)
)
))
recurr(
main =>
@plasma-effect
plasma-effect / a.md
Created December 3, 2015 18:23
constexpr多倍長整数

皆様おはようございます。@plasma_effector です。この記事はAizuアドベントカレンダー4日目です。 #自己紹介 数学系の3回生です。何も考えず登録した後Aizuとあんま関係ないと気付きましたが気にせずやります。
普段はC++とC#でなんか作ってます。たまにTypeScriptでゲームを作ります。 #やること C++のconstexprには様々な可能性が存在します。
多倍長整数をコンパイル時に使えたらいいなぁって思ったのでconstexprな多倍長整数を作ろうって思いました。 #補足 constexprとは ※この項は普段C++使ってる方は読み飛ばしてもらって構いません
C++11で追加された定数評価に関する指定子です。gccとclangとmsvcでは使えます。

@jspenguin2017
jspenguin2017 / onbeforescriptexecute.html
Last active August 12, 2018 15:59
A (somewhat working) polyfill for beforescriptexecute event
MOVED TO: https://github.com/jspenguin2017/Snippets/tree/master
version: '3'
services:
ide:
image: chinodesuuu/coder:latest
volumes:
- /home/coder/projects
ports:
- '9000:9000'
@YoOoster
YoOoster / depuzzlefy.pl
Last active January 18, 2020 13:36 — forked from gray/depuzzlefy.pl
Solves sudoku and image jigsaw puzzles created by http://flash-gear.com/puzzle/ and https://www.jigidi.com/
use 5.012;
use strict;
use warnings;
use File::Temp qw(tempfile);
use IPC::System::Simple qw(capture system);
use LWP::UserAgent;
use URI::QueryParam;
use Win32::GUI;
use Data::Dumper;
use integer;
@maple3142
maple3142 / onbeforescriptexecute.js
Last active July 7, 2020 00:58 — forked from jspenguin2017/onbeforescriptexecute.html
polyfill of 'beforescriptexecute' event
// 'beforescriptexecute' event [es5]
// original version: https://gist.github.com/jspenguin2017/cd568a50128c71e515738413cd09a890
;(function() {
;('use strict')
function Event(script, target) {
this.script = script
this.target = target
this._cancel = false
@mbleigh
mbleigh / README.md
Last active September 25, 2020 04:26
Automate the deletion of old Firebase Hosting versions.

Firebase Hosting Version Cleanup

This is a simple utility script for cleaning up Firebase Hosting versions, leaving a specified number of versions remaining. This is primarily done to conserve storage usage, but may have other uses.

USE AT YOUR OWN RISK. NO WARRANTY IS PROVIDED. THIS SCRIPT DOES DELETE STUFF PERMANENTLY

Usage

node cleanupVersions.js [commit]

@shazron
shazron / delete_all_greenkeeper_branches.sh
Last active April 8, 2021 13:44
Delete all Greenkeeper branches
#!/bin/bash
# Description:
# Delete all `greenkeeper/*` branches of your remote.
# Instructions:
# Run the script with the `--help` flag.
ORIGIN=origin
DRY_RUN=0
THIS=`basename "$0"`
@WebReflection
WebReflection / esm-in-nodejs.md
Last active October 20, 2021 14:54
Solving the "ESM in NodeJS" Odyssey.

Solving the "ESM in NodeJS" Odyssey.

After months of discussions in a dedicated group, it's clear to me NodeJS is still stuck in finding a way to deliver native ESM to its users.

The "usual few" won't hear anything different from .mjs, but .mjs has been demonstrated to be not a solution neither.

Following few cases not covered by .mjs:

  • evaluation of any string, via CLI, or on demand, where there is no extension
  • tools that convert their syntax into JS, since it always worked to date (thanks to transpilers, bundlers, and loaders)