Skip to content

Instantly share code, notes, and snippets.

View nocksock's full-sized avatar

Nils Riedemann nocksock

View GitHub Profile
@nocksock
nocksock / README.md
Last active January 17, 2025 09:15
Deploy ObservableHQ Framework on fly.io

Deploy ObservableHQ Framework on fly.io

Prerequisites

  • Account at fly.io.
  • fly's cli is installed and authenticated.
  • A [Framework] project.

Steps

@nocksock
nocksock / square_pow_bench.ts
Last active November 9, 2024 13:38
There's no difference in `a*a` vs `Math.pow(a, 2)` in JS (unlike some other languages)
// $ deno bench main_bench.ts
// benchmark time/iter (avg) iter/s (min … max) p75 p99 p995
// ---------------- ----------------------------- --------------------- --------------------------
// a*a 4.9 ms 204.1 ( 3.8 ms … 9.1 ms) 5.3 ms 8.4 ms 9.1 ms
// Math.pow(a, 2) 5.0 ms 200.0 ( 3.8 ms … 11.2 ms) 5.6 ms 8.6 ms 11.2 ms
//
// a*a 4.8 ms 209.8 ( 3.8 ms … 7.9 ms) 5.2 ms 6.8 ms 7.9 ms
// Math.pow(a, 2) 4.8 ms 207.0 ( 3.8 ms … 7.5 ms) 5.2 ms 7.4 ms 7.5 ms
//
// a*a 4.9 ms 205.9 ( 3.8 ms … 7.8 ms) 5.4 ms 7.7 ms 7.8 ms
/**
*
**/
// require modules {
var gulp = require('gulp');
var concat = require('gulp-concat');
var gutil = require('gulp-util');
var sass = require('gulp-sass');
var plumber = require('gulp-plumber');
var header = require('gulp-header');

Keybase proof

I hereby claim:

  • I am noxoc on github.
  • I am noxoc (https://keybase.io/noxoc) on keybase.
  • I have a public key whose fingerprint is E2A1 DD94 5C92 594D AB86 80D7 E4DD 9AE7 CB79 0A66

To claim this, I am signing this object:

@nocksock
nocksock / Gruntfile.js
Created October 31, 2013 15:09
Grunt-Template for HTML and CSS-Stuff.
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dev: {
options: {
sassDir: 'sass',
cssDir: '.',
}
@nocksock
nocksock / index.html
Created April 4, 2013 17:59
A CodePen by Nils Riedemann. RayCasting Part2 - Using the basis of my previous RayCasting implementation to create the classic 3D simulation.
<h1>Use the Cursor Keys!</h1>
<p>… after you clicked on the canvas</p>
@nocksock
nocksock / update.sh
Created April 20, 2012 08:55
QND Kirby Update Script
#!/usr/bin/env sh
# very quick and dirrrty updatescript
echo "Update started"
git clone https://github.com/bastianallgeier/kirbycms.git &&
rm -rf kirby &&
mv kirbycms/kirby . &&
rm -rf kirbycms
echo "Update finished"
@nocksock
nocksock / capistrano_database_yml.rb
Created March 26, 2012 13:32 — forked from weppos/capistrano_database_yml.rb
Provides a couple of tasks for creating the database.yml configuration file dynamically when deploy:setup is run.
#
# = Capistrano database.yml task
#
# Provides a couple of tasks for creating the database.yml
# configuration file dynamically when deploy:setup is run.
#
# Category:: Capistrano
# Package:: Database
# Author:: Simone Carletti <[email protected]>
# Copyright:: 2007-2010 The Authors
tat() {
tmux attach -t $1;
}
_tat() {
tmux list-sessions | awk 'BEGIN { FS=":" } { print $1 }' | sed 's/[ ]/\\ /'
}
compdef _tat tat
@nocksock
nocksock / readme.mdown
Created January 26, 2012 12:52
Quick and Dirrrty Update-Script for kirby

How To?

Simply put the update.sh into the root of your kirby-project. next to kirby/, content/, site/ and other folders. Make it executable with chmod a+x update.sh and execute it with ./update.sh everytime you want to update your kirbycms to the latest version - from within the command line of course.

Requirements

Though it is obvious: you need git.