Skip to content

Instantly share code, notes, and snippets.

View kgryte's full-sized avatar
😃
Working on stdlib...

Athan kgryte

😃
Working on stdlib...
View GitHub Profile

dynamic-typedarray

Introduction

This module wraps typed arrays with a minimal abstraction so that you can resize and append to them without reallocating and transferring data yourself.

Example

When initializing, you may pass an Array, a typed array, a size, or a dtype string. (Adding a dtype string will cast the data if necessary.) The following are equivalent ways to initialize a double precision dynamic typed array.

@surma
surma / README.md
Last active March 8, 2024 12:06
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@yosuke-furukawa
yosuke-furukawa / nodefest_timetable.md
Last active October 18, 2017 02:15
NodeFest Timetable

Timetable

当日のタイムテーブル

11/24

Speakers's dinner 🔈

when where who what
19:30 Shibuya? Staff + Speaker + Sponsers Dinner
@mafintosh
mafintosh / npm-classic-config.sh
Last active June 21, 2018 17:40
Resets the npm defaults to how they used to be
npm config set loglevel http
npm config set progress false
npm config set package-lock false
npm config set save false
mkdir -p ~/.config/configstore/
printf '{"optOut": true,"lastUpdateCheck": 0}' > ~/.config/configstore/update-notifier-npm.json
@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
  • Solving tricky problems in real-world code bases and the lessons learned along the way
  • Nodebots, IoT, and hardware hacking at large
  • Real-time web applications
  • Offline-first web applications
  • Developing for small screens, big screens, or no screen at all
  • A modern take on JavaScript (or Open Web) fundamentals
  • The intersection of art and code
  • Historical insights into the modern web
  • Crazy hacks and even crazier ideas
  • Developer tools, workflows, and best practices

Index

Preface

Together with HellMood we won this year's (2016) JS1K competition and thought this might be a good opportunity to write about the development process and my motivation behind it. If you're already familiar with JS1K, feel free to skip the next two paragraphs.

@cormullion
cormullion / stackad.jl
Last active January 7, 2018 11:31
Make StackOverflow ad for Julia
#!/usr/bin/env julia
using Luxor, Colors
Drawing(600, 500, "/tmp/stackad.png")
origin()
background("white")
# background textifying, not for reading, fortunately
function background_text(str_array, fontsz, beginning::Point, ending::Point)
@mafintosh
mafintosh / app.js
Last active November 26, 2022 00:03
Showcasing bundled prebuilds with different runtimes
var electron = require('electron')
electron.app.on('ready', function () {
var win = new electron.BrowserWindow({
width: 800,
height: 600
})
win.loadURL('file://' + __dirname + '/index.html')
win.toggleDevTools()
@vicapow
vicapow / example3-helloworld.s
Created December 31, 2016 21:38
'Hello world!' in x86_64 assembly without using any external libs.
## 'Hello world!' in x86_64 AT&T gas assembly in OS X.
## To assemble $> as -arch x86_64 example3-helloworld.s -o example3-helloworld.o
## To link: $> ld -arch x86_64 example3-helloworld.o -e _main -o example3-helloworld -lSystem
.section __TEXT,__text
.macosx_version_min 10, 12
.globl _main
_main:
movq $0x2000004, %rax # write (system call $4 with $0x2000000 offset)
movq $1, %rdi # write to stdout (fid 1)
leaq L_.str(%rip), %rsi # set the register address of the start of the string