Skip to content

Instantly share code, notes, and snippets.

View Oakchris1955's full-sized avatar
🇺🇦
#StandWithUkraine

Oakchris1955 Oakchris1955

🇺🇦
#StandWithUkraine
View GitHub Profile
/* Numerically solve for the time-dependent Schrodinger equation in 2D,
using the split operator method. To build and run, type:
rustc qm2d_split_op.rs
./qm2d_split_op
This will output a series of bmp images which show each frame of the
simulation.
References:
@jart
jart / rename-pictures.sh
Created December 12, 2023 15:24
Shell script for renaming all images in a folder
#!/bin/sh
# rename-pictures.sh
# Author: Justine Tunney <jtunney@gmail.com>
# License: Apache 2.0
#
# This shell script can be used to ensure all the images in a folder
# have good descriptive filenames that are written in English. It's
# based on the Mistral 7b and LLaVA v1.5 models.
#
# For example, the following command:
@Xeukxz
Xeukxz / RevertUI.md
Last active June 30, 2024 07:06
Revert Discord UI

Updated Version:

If you want to download an older version ive heard 205.15 works well, i reccomend ApkMirror

Using a modified app (Android & IOS friendly):

  1. Follow the instructions from https://github.com/vendetta-mod/Vendetta
  2. After the client is installed, navigate to Settings > Plugins, then click the +, and finally paste https://vd-plugins.github.io/proxy/maisymoe.github.io/strife/Experiments into the input and click Install
  3. Once the experiments plugin is enabled, reload the app then go to Settings > Experiments > Tabs V2 - redesign opt-out/in for all and select Control Bucket.

Ive also heard enmity works well for IOS.

@dominiwe
dominiwe / uninstall-guix.md
Created December 27, 2022 14:27
Uninstall guix after installing it on top of an existing GNU/Linux system

How to uninstall guix

Date of creation: 2022-12-27

First of all, if the install script referenced here was used to install guix, ideally the output of that script as well as the script itself should have been saved somewhere. This makes it easier to see which components were installed and where and thus makes it easier for you to uninstall them.

As for me personally, I used the install script to install guix on a debian derivative distribution with systemd. This guide thus focuses on uninstalling guix from a debian derivative distribution but will probably work for your distribution as well with some slight changes.

@ConnerWill
ConnerWill / ANSI-escape-sequences.md
Last active September 22, 2024 10:36
ANSI Escape Sequences cheatsheet

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@atkvishnu
atkvishnu / dino.md
Last active December 8, 2022 15:38
chrome://dino/
  1. Disable gameover functionality
var original = Runner.prototype.gameOver
Runner.prototype.gameOver = function (){}
  1. Enable gameover functionality
@maalos
maalos / microsnek.html
Last active November 3, 2023 15:45
smallest snake game in js (498 characters)
<canvas id=g width=256 height=256 style="border:solid"><script>[c,j,s,z,h]=[g.getContext("2d"),16,[[8,8]]];a=s[0];onkeydown=({key:e})=>[z,h]={d:[z||1,0],a:[z||-1,0],s:[0,h||1],w:[0,h||-1]}[e];setInterval(()=>{if(s.unshift([s[0][0]+z&15,s[0][1]+h&15]),""+s[0]==a)with(Math)for(r=random(),f=floor(j*r);a=[f,f],s.some(e=>""+e==a););else s.slice(1).some(e=>""+e==s[0])?s.splice(1):s.pop();c.clearRect(0,0,256,256);c.fillRect(j*a[0],j*a[1],j,j);s.forEach(([e,l])=>c.fillRect(j*e,j*l,j,j))},125)</script>

brainfuck snippets

arithmetical

addition

|5|3| → |8|0|
   ^       ^
[<+>-]

subtraction

@DominicMaas
DominicMaas / rpi_pico_littlefs.h
Last active August 20, 2024 03:27
Not much testing, but this should work for using LittleFS with the Raspberry Pi Pico built in flash chip.
#pragma once
#include "pico/stdlib.h"
#include "pico/binary_info.h"
#include "hardware/flash.h"
#include "hardware/sync.h"
#include <lfs.h>
@ConorJOHanlon
ConorJOHanlon / RPi_I2C_driver.py
Created April 10, 2021 15:47 — forked from DenisFromHR/RPi_I2C_driver.py
RaspberryPi I2C LCD Python stuff
# -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# added bits and pieces from various sources
# By DenisFromHR (Denis Pleic)