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 1, 2024 04:22
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.

@ConnerWill
ConnerWill / ANSI-escape-sequences.md
Last active June 1, 2024 12:33
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 October 15, 2023 14:28
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)
@Soheab
Soheab / API's.md
Last active June 1, 2024 07:56
See here some of the API's you can use in your discord bot or anything

Some API's for you.

See here some of the API's you can use in your discord bot or anything. For any help or questions on how to use one, please contact the owner of the API and not me.

A much bigger list of APIs can be found here


[TOKEN] = API requires a token to access some if not all endpoints.

The descriptions are mostly copied from the API, sometimes personal or from the dev.