Skip to content

Instantly share code, notes, and snippets.

View ahvonenj's full-sized avatar
🐢
${framework} solves everything!

Jonah ahvonenj

🐢
${framework} solves everything!
View GitHub Profile
@ahvonenj
ahvonenj / double_helix.txt
Created June 18, 2019 14:00
Double Helix Formula
No, my question was the formula for a curve with the double
helix structure; I believe this is the answer to my question:
(quoting from a letter to me:)
A helix is a circle that moves up with time. Hence the equations
x(t) = sin t
y(t) = cos t
z(t) = t
@ahvonenj
ahvonenj / breachcompilation.txt
Created January 23, 2019 14:37
1.4 billion password breach compilation wordlist
wordlist created from original 41G stash via:
grep -rohP '(?<=:).*$' | uniq > breachcompilation.txt
Then, compressed with:
7z a breachcompilation.txt.7z breachcompilation.txt
Size:
@ahvonenj
ahvonenj / script.js
Last active August 17, 2018 02:17
[TamperMonkey] Download all files of commit -- Adds a custom button to github commit view pages from which all the changed files can be downloaded. Useful for when something is removed from a repository and only the commit information remains.
// ==UserScript==
// @name Github commit files downloader
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://github.com/*/*/commit/*
// @grant none
// ==/UserScript==
@ahvonenj
ahvonenj / gulpfile.js
Last active November 20, 2017 13:01
Gulp base
var gulp = require('gulp');
var less = require('gulp-less');
var minify = require('gulp-minify');
var path = require('path');
var jsonminify = require('gulp-jsonminify');
var rename = require("gulp-rename");
var babel = require('gulp-babel');
gulp.task('default', function(cb)
@ahvonenj
ahvonenj / specialexec.js
Created June 16, 2017 10:18
How to execute a JavaScript function when I have its name as a string
// http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string
function Exec(functionName, context)
{
if(typeof functionName === 'undefined')
{
console.error('Could not execute undefined function');
return function() {}
}
var args = Array.prototype.slice.call(arguments, 2);
@ahvonenj
ahvonenj / scalefix.js
Created May 17, 2017 10:01
JQuery UI Draggable Scale Fix (Actually working)
// https://stackoverflow.com/questions/17098464/jquery-ui-draggable-css-transform-causes-jumping
//css3 transform bug with jquery ui drag - fixed(works fine whether position, absolute or relative)
var __dx;
var __dy;
var __scale=0.5;
var __recoupLeft, __recoupTop;
@ahvonenj
ahvonenj / pixi-debugger.js
Last active January 3, 2020 14:52
PixiDebugger - Graphical Debugger for Pixi.js
var PixiDebugger =
{
program: null,
debugobjects: [],
namedobjects: [],
// Program must be set for PixiDebugger before use
// Program is an object that contains pixi.stage and pixi.renderer
SetProgram: function(p)
@ahvonenj
ahvonenj / html.html
Last active December 17, 2015 15:47
Vanilla JavaScript canvas test
<canvas id = "canv"></canvas>
@ahvonenj
ahvonenj / canvascoords.js
Created December 16, 2015 11:05
Canvas pointer coords no matter where and how big canvas is
relMouseCoords: function(canvas, e)
{
var rect = canvas.getBoundingClientRect();
var x = e.clientX - rect.left;
var y = e.clientY - rect.top;
return { x: x, y: y };
}
relTapCoords: function(canvas, e)
{
@ahvonenj
ahvonenj / fill.css
Created December 16, 2015 09:50
Make element fill any element
.mmloader_container
{
width: 100%;
height: 100%;
display: flex;
display: -webkit-flex;
align-items: center;
justify-content: center;