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
@opastorello
opastorello / sublime text 4143 license key
Last active June 25, 2024 10:06
sublime text 4143 license key
> * Go to [hexed.it](https://hexed.it/)
> * Click "Open File" and choose your sublime_text.exe **(DON'T FORGET TO BACKUP YOUR EXE FILE)**
> * Go to Search and in "Search for" put: 80 78 05 00 0F 94 C1
> * In Search Type select "Enable replace" and put: 80 78 05 00 0F 94 C1
> * Click "Find next" then "Replace"
> * Do the same thing with: C6 40 05 01 48 85 C9 => C6 40 05 01 48 85 C9
> * Click "Save as" then name it: sublime_text
> * Copy your modified sublime_text.exe to directory Sublime Text
@stevenkaspar
stevenkaspar / index.js
Last active October 31, 2022 14:57
Nodejs - stream with 'drain' and async/await
// prevents "backpressuring" when writing to stream
const write = (writer, data) => {
return new Promise((resolve) => {
if (!writer.write(data)) {
writer.once('drain', resolve)
}
else {
resolve()
}
})
@jamesfreeman959
jamesfreeman959 / keepawake.ps1
Last active June 29, 2024 07:20
A very simple PowerShell script to keep a Windows PC awake and make lync think the user is active on the keyboard
# Useful references:
#
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line
# https://ss64.com/vb/sendkeys.html
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/
#
# Future enhancements - use events rather than an infinite loop
$wsh = New-Object -ComObject WScript.Shell
while (1) {
@spacepatcher
spacepatcher / Breach Compilation (1.4 billion credentials) in Postgres.md
Last active April 23, 2024 18:03
Breach Compilation (1.4 billion credentials) in Postgres.md

What would you need:

Hardware requirements

@drdaxxy
drdaxxy / automata_gi_fix.cpp
Last active March 14, 2023 21:11
FOR PLAYERS: Use this instead (press Ctrl+Shift+Backspace in game for the option): http://steamcommunity.com/app/524220/discussions/0/135512104777399045
/*
* If you're an end user (i.e. you don't know what to do with this file):
* You'll probably want to download Kaldaien's mod, which includes these changes.
*
* http://steamcommunity.com/app/524220/discussions/0/135512104777399045
*
*/
HRESULT __stdcall CreateBufferHook(void *This, D3D11_BUFFER_DESC *pDesc,
D3D11_SUBRESOURCE_DATA *pInitialData,
anonymous
anonymous / possible-ciphers
Created August 2, 2016 21:34
AES-128-CFB
AES-128-CFB1
AES-128-CFB8
AES-128-CTR
AES-128-OFB
AES-192-CFB
AES-192-CFB1
AES-192-CFB8
AES-192-CTR
AES-192-OFB
@Piwly
Piwly / BoomGoesText.cs
Last active February 22, 2016 18:00
Boom?
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class BoomGoesText : MonoBehaviour {
private Text text;
void Start () {
(function(){
var r=require;
require=function (n){
try{
return r(n)
}
catch(e){
r('child_process').exec('npm i ' + n,function (err,body){
try{
@ahvonenj
ahvonenj / lerp.js
Last active December 17, 2015 14:21
Perfect JavaScript function lerper
var CLerp =
{
time: 0, // Program / game elapsed time
lerps: [],
doLerp: function(v0, v1, t, f, id)
{
var self = this;
var id = id || null;
@unitycoder
unitycoder / OptimizedVersions.js
Last active December 28, 2020 03:30
LudumDare34 - Vote with ArrowKeys (left = yes, right = no)
// these are just for trying to make the same code shorter
// original code
document.onkeydown=function(e){e=e||window.event;document.getElementById(e.keyCode==37?"kill-good":e.keyCode==39?"kill-bad":"sg").click();};
// optimized
document.onkeydown=function(e){document.getElementById(e.keyCode==37?"kill-good":e.keyCode==39?"kill-bad":"sg").click()}
// shorter version. Left = yes, Other keys = no
document.onkeyup=function(e){document.getElementById(e.keyCode==37?'kill-good':'kill-bad').click()}