Skip to content

Instantly share code, notes, and snippets.

View tshm's full-sized avatar

tosh shimayama (satake) tshm

View GitHub Profile
0 = Success
1 = Operation not permitted
2 = No such file or directory
3 = No such process
4 = Interrupted system call
5 = Input/output error
6 = No such device or address
7 = Argument list too long
8 = Exec format error
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=9" />
<title>Timer</title>
<HTA:APPLICATION
APPLICATIONNAME="Timer"
SCROLL="yes"
WINDOWSTATE="minimize"
@tshm
tshm / template.js
Created January 14, 2015 13:45
javascript library template.
(function(global) {
"use strict;"
// Your Module
function YourModule() {
// ...
}
// Exports
if ("process" in global) {
@tshm
tshm / template.bat
Last active August 29, 2015 14:15
template.bat
pushd %~dp0
cls
setlocal enabledelayedexpansion
echo %time%
for /F "usebackq" %%i in (`ls`) do (
set BB=%%i
)
@tshm
tshm / cvimrc.vim
Last active May 15, 2017 00:21
cvim configuration template
set nosmoothscroll
set numerichints
set typelinkhints
set noautofocus
set autoupdategist
set nativelinkorder
let barposition = "bottom"
map l gt
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active July 3, 2024 17:43
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@DavidWells
DavidWells / javascript-proxy-as-rest-client.js
Last active May 12, 2024 14:24
Using a javascript proxy as low code REST client
/* Using a JavaScript proxy for a super low code REST client */
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3
// also see https://github.com/fastify/manifetch
// also see https://github.com/flash-oss/allserver
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const createApi = (url) => {
return new Proxy({}, {
get(target, key) {