Skip to content

Instantly share code, notes, and snippets.

View fand's full-sized avatar
💭
🔪

AMAGI / Jun Yuri fand

💭
🔪
View GitHub Profile
@bsergean
bsergean / README.md
Last active March 8, 2022 01:23
offscreen rendering with three.js and headless-gl, in coffee-script

Getting the code

git clone https://gist.github.com/6780d7cc0cabb1b4d6c8.git

Executing the code

$ npm install # maybe npm start will take care of it but just in case
$ npm start && open out.png

> offscreen-sample@1.0.0 start /Users/bsergean/src/offscreen_sample

@danmactough
danmactough / second-boot.sh
Created July 31, 2015 06:55
Setting up a gpu (nvidia) ec2 instance with ubuntu and electron for headless webgl rendering
#!/bin/bash -xe
# Unload nouveau
sudo rmmod nouveau
# Load nvidia
sudo modprobe nvidia
# Configure X
sudo nvidia-xconfig --use-display-device=None --virtual=1280x1024 --output-xconfig=/etc/X11/xorg.conf --busid=PCI:0:3:0 --enable-all-gpus
@BinaryMuse
BinaryMuse / restful.js
Last active March 17, 2019 08:22
Express API with Async/Await
import express from "express";
/**
* Takes a route handling function and returns a function
* that wraps it after first checking that the strings in
* `reserved` are not part of `req.body`. Used for ensuring
* create and update requests do not overwrite server-generated
* values.
*/
function checkReservedParams(routeHandler, ...reserved) {
@voluntas
voluntas / mqtt.rst
Last active March 1, 2023 06:47
MQTT とはなんだったのか

MQTT とはなんだったのか

更新

2017-05-09

作者

@voluntas

バージョン

3.14

URL

http://voluntas.github.io/

MQTT をググって調べた人向け

@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@hashrock
hashrock / npmbenri.md
Last active August 20, 2023 05:54
npmで入る便利ツールまとめ

npm -gでインストールしたり、npm scripts内から使えそうなツールのまとめ

nodeプロセスマネージャ

開発時にリスタートしてくれる用途のものも含む

  • pm2
  • forever
  • node-dev
  • nodemon
@koba04
koba04 / .gitignore
Last active December 21, 2018 02:21
karma + mocha + browserify + babel + power-assert
node_modules/
@ykst
ykst / gist:8557e2ce9280111c41b6
Created January 28, 2015 14:11
glsl-optimizerでGLSLのオフライン最適化を行う

glsl-optimizerでGLSLのオフライン最適化を行う

OpenGLにコンパイルしてもらう時点でシェーダにはある程度最適化が行われるようですが、 モバイルデバイスではあまりコストの掛かる最適化は行われないだろうという事で、 オフラインでGLSLの最適化をしてくれるフレームワークとしてglsl-optimizerがあります。 サポートされているGLSLバージョンはES2.0とES3.0もカバーしていますが、未対応の拡張もあります。

元々はUnityが機械生成した冗長なGLSLを最適化するために作られたようですが、 一応手書きのシェーダの最適化に使うこともできます。 ただし、組み込みを前提としているようでコマンドラインからキックするバイナリは提供されていません。

@kariyayo
kariyayo / 00_すごいHaskellたのしく学ぼう!をScalaでやってみたメモ.md
Last active December 14, 2019 11:00
すごいHaskellたのしく学ぼう!をScalaでやってみたメモ
@cvrebert
cvrebert / css_regression_testing.md
Last active May 9, 2023 12:13
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots