Skip to content

Instantly share code, notes, and snippets.

@j100002ben
j100002ben / GLSL-Noise.md
Created December 31, 2022 16:51 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@j100002ben
j100002ben / fbo_renderer.go
Created April 12, 2022 00:19
g3n Framebuffer example
// renderer/fbo_renderer.go
// Copyright 2016 The G3N Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package renderer
import (
"errors"
@j100002ben
j100002ben / app-tinygo.js
Created October 5, 2020 15:10 — forked from elct9620/app-tinygo.js
Define JavaScript class inside Golang (WebAssembly)
import 'vendor/tinygo'
const go = new Go();
go.importObject.env['main.defineClass'] = function(namePtr, nameLen, cPtr, cGcPtr, pPtr/*, pGcPtr*/) {
const mem = new DataView(go._inst.exports.memory.buffer)
const decoder = new TextDecoder("utf-8");
const name = decoder.decode(new DataView(go._inst.exports.memory.buffer, namePtr, nameLen));
const constructorID = mem.getUint32(cPtr, true)
@j100002ben
j100002ben / start-fcrackzip.sh
Created August 23, 2019 07:14 — forked from shikendon/start-fcrackzip.sh
Achieve fcrackzip parallel cracking by using xargs
logfile=$(date +%Y%m%d%H%M).log
targetfile=test.zip
# Start 1 processes for cracking mixalpha-numeric maximum 5 digits
fcrackzip -c Aa1 -b -l 1-5 --verbose -u $targetfile & >> $logfile &
# Start 62 processes for cracking mixalpha-numeric equal to 6 digits
eval echo\ {A..Z}AAAAA\; | xargs -I % -P 26 fcrackzip -c Aa1 -b -p % --verbose -u $targetfile >> $logfile &
eval echo\ {a..z}AAAAA\; | xargs -I % -P 26 fcrackzip -c Aa1 -b -p % --verbose -u $targetfile >> $logfile &
eval echo\ {0..9}AAAAA\; | xargs -I % -P 10 fcrackzip -c Aa1 -b -p % --verbose -u $targetfile >> $logfile &
var pcsc = require('pcsclite');
var iconv = require('iconv-lite');
var pcsc = pcsc();
pcsc.on('reader', function(reader) {
console.log('New reader detected', reader.name);
reader.on('error', function(err) {
@j100002ben
j100002ben / Ulteo-OVD implementation guide.md
Last active December 19, 2016 21:51 — forked from jas-/readme.md
Ulteo-OVD implementation guide

Ulteo Remote Application Server

Installation, configuration, patching & troubleshooting guide to the Ulteo-OVD services. Additional details of this software can be found on their website. Here are some useful resources.

  1. Ulteo home - http://www.ulteo.com/home/
  2. Ulteo Downloads - http://ulteo.com/home/en/ovdi/openvirtualdesktop/3.0
  3. Ulteo OVD source code - http://www.ulteo.com/home/en/download/sourcecode
  4. Additional OVD source code access - http://archive.ulteo.com/mirror/ovd/releases/sources/
  5. Community forums - https://groups.google.com/forum/?fromgroups#!forum/ulteo-ovd-community-support
@j100002ben
j100002ben / install.md
Created May 10, 2016 21:53 — forked from hlb/Brewfile
clean install

System Preferences

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 12

# Set a blazingly fast keyboard repeat rate
@j100002ben
j100002ben / install.md
Created May 10, 2016 21:52 — forked from wanewang/install.md
clean install

System Preferences

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 12

# Set a blazingly fast keyboard repeat rate
https://support.microsoft.com/zh-tw/kb/3080351
@j100002ben
j100002ben / autoclick.py
Created March 7, 2016 08:30 — forked from franzwong/autoclick.py
Auto click button (Windows)
import sys
import ctypes
import time
EnumWindows = ctypes.windll.user32.EnumWindows
EnumChildWindows = ctypes.windll.user32.EnumChildWindows
EnumWindowsProc = ctypes.WINFUNCTYPE(ctypes.c_bool, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int))
GetWindowText = ctypes.windll.user32.GetWindowTextW
GetWindowTextLength = ctypes.windll.user32.GetWindowTextLengthW
IsWindowVisible = ctypes.windll.user32.IsWindowVisible