Skip to content

Instantly share code, notes, and snippets.

@AimForNaN
AimForNaN / install.md
Created May 22, 2023 04:11
Microsoft Marketplace for VSCodium

Instructions

Save product.json to the following locations for your OS:

  • Linux: $HOME/.config/VSCodium
  • Mac: $HOME/Library/Application Support/VSCodium
@AimForNaN
AimForNaN / the-doctrine-of-the-trinity.php
Last active December 19, 2020 02:45
The doctrine of the trinity visualized in PHP.
abstract class God {
protected bool $AllKnowing = true;
protected bool $Almighty = true;
protected bool $AllWise = true;
protected bool $Creator = true;
protected bool $Eternal = true;
protected bool $Immutable = true; // Unchanging!
protected bool $Omnipresent = true;
abstract public function role();
@AimForNaN
AimForNaN / bring-back-window.py
Created November 29, 2017 21:07
Will position a window onto the main screen to x(0) y(0) with size width(800) height(800)
"""
Usage: python bring-back-window.py [--title WindowTitle]
Example: python bring-back-window.py --title "Create a new Gist - Google Chrome"
Depends on Python 3 and pywin32.
"""
import argparse, win32gui;
def enum(hwnd, extra):
@AimForNaN
AimForNaN / electron-expose-node-to-web.js
Created November 27, 2017 23:00
Expose Node.js modules to web pages in Electron!
function escapePath (path) {
// Handle Windows paths!
return path.replace(/\\/g, '\\\\');
}
const {app, BrowserWindow, session} = require('electron');
const path = require('path');
const AppPath = app.getAppPath();
const NodeModules = escapePath(path.resolve(AppPath, 'node_modules'));