This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; windows emacs home setup | |
;; Place this file in C:\Users\Username\AppData\Roaming | |
;; put gpg4win GnuPG\bin in PATH before msys2 | |
;; in threat protection settings add exclusions for emacs, .emacs.d folders | |
(setenv "HOME" "C:/Users/ollie") | |
(setq user-emacs-directory "C:/Users/ollie/.emacs.d/") | |
(setq user-init-file "C:/Users/ollie/.emacs.d/init.el") | |
(setq default-directory "C:/Users/ollie") | |
(setq package-gnupghome-dir "~/.emacs.d/elpa/gnupg") | |
; if msys2 usr/bin in path: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workspaceSidebar.folder": "C:\\Users\\ollie\\Documents\\projects", // projecct manager ext | |
"editor.mouseWheelScrollSensitivity": 3, | |
"terminal.integrated.accessibleViewPreserveCursorPosition": true, | |
"terminal.integrated.profiles.windows": { | |
"PowerShell": { | |
"source": "PowerShell", | |
"icon": "terminal-powershell" | |
}, | |
"Command Prompt": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;tray icon tooltip | |
A_IconTip := "alt-l: nightlight`nctl-alt-up: winontop`nctl-alt-b: hidebar" | |
;*********** Alt-l : open night light *********************; | |
!l:: Run "ms-settings:nightlight" | |
;*********** Ctl-Alt-Up : pin window on top ***************; | |
^!Up:: WinSetAlwaysOnTop -1, "A" | |
;*********** Ctl-Alt-b : hide/show taskbar ****************; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# ---lxc setup script--- | |
addline(){ | |
grep -q "${1}\|${3}\?" "$2" || echo "\n$1" | sudo tee -a "$2" > /dev/null | |
} | |
uname=$(id -u -n) | |
uid=$(id -u) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import base64 | |
import sys | |
from hashlib import sha256 | |
from cryptography.fernet import Fernet, InvalidToken | |
def encrypt(pwd, st): | |
h = sha256(bytes(pwd, 'utf-8')).hexdigest()[:32] | |
key = base64.urlsafe_b64encode(bytes(h, 'utf-8')) | |
f = Fernet(key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = /*glsl*/`#version 300 es | |
precision mediump float; | |
out vec4 fragColor; | |
uniform vec2 resolution; | |
uniform vec2 mouse; | |
uniform float time; | |
vec2 ball(float t){ | |
return vec2(sin(t*1.2)*cos(5.+t*.82), cos(6.+t*.9)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const canvas = document.querySelector('canvas'); | |
const gl = canvas.getContext('webgl2'); | |
var clearcolor = [.5,.5,.5,1]; | |
/* | |
reserved attributed names: position, indices | |
*/ // same as twgl | |
gl.clearColor(...clearcolor); | |
gl.clear(gl.COLOR_BUFFER_BIT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// gl-view - by shellderr //// | |
import | |
{setUniforms, | |
drawBufferInfo, | |
setBuffersAndAttributes, | |
createTexture, | |
createProgramInfo, | |
createBufferInfoFromArrays, | |
resizeCanvasToDisplaySize} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dearpygui.dearpygui as dpg | |
import easygui | |
import cv2 as cv | |
import numpy as np | |
from types import SimpleNamespace | |
import os | |
g = SimpleNamespace( | |
fname = './test.jpg', | |
fnames = (), |
NewerOlder