Skip to content

Instantly share code, notes, and snippets.

View hising's full-sized avatar

Mattias Hising hising

View GitHub Profile
@hising
hising / guidelines.md
Last active May 3, 2025 21:14
Junie Guidelines

IMPORTANT GUIDELINES

  • Make sure to add files to git that you create
  • Make a commit for each task you complete, as atomic as possible
  • Make sure you fix eslint errors and warnings
  • Make sure all added md docs are linked in README.md
  • For larger tasks, create a new branch and make a pull request
  • When fixing tasks from docs/tasks.md, make sure to set the task to done in the file
  • Make sure to push the branch to the remote repository
  • Do not be to generic in your suggestions, be specific
  • Make sure you are in the correct branch when you make changes
@hising
hising / crt.html
Created January 24, 2025 21:16
Try to mimic a CRT-screen when embedding retro game longplays
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CRT YouTube Player</title>
<style>
body {
display: flex;
flex-direction: column;
@hising
hising / sirius.html
Created October 5, 2024 19:44
IK Sirius - Last 5 2024
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Football Points Simulation</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
<canvas id="resultsChart" width="400" height="200"></canvas>
@hising
hising / useModals.tsx
Created August 29, 2024 18:38 — forked from statico/useModals.tsx
Chakra UI await-able alert, confirm, and prompt modal dialogs
/*
* Usage:
* const { alert, confirm, prompt } = useModals()
* alert("Hey!") // awaitable too
* if (await confirm("Are you sure?")) ...
* const result = await prompt("Enter a URL", "http://")
*/
import React, {
createContext,
@hising
hising / .zshrc
Created November 23, 2023 19:38
.zshrc
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="nord-extended/nord"
HIST_STAMPS="yyyy-mm-dd"
source ~/.zplug/init.zsh
zplug "plugins/git", from:oh-my-zsh
zplug "zsh-users/zsh-completions"
zplug 'zsh-users/zsh-syntax-highlighting', defer:2
zplug 'zsh-users/zsh-history-substring-search', defer:3
@hising
hising / pods.sh
Created April 21, 2022 08:23
Reinstall pods
rm -rf ~/Library/Caches/CocoaPods Pods ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
pod install
@hising
hising / game-loop.js
Created August 10, 2021 18:20
Simple Game Loop in JavaScript
let previousTime = 0.0;
let isGameRunning = true;
const update = (diff) => {
console.log(diff);
};
const render = () => { };
const loop = time => {
const dt = time - previousTime;
@hising
hising / keys.sh
Created July 30, 2021 16:05
Grab keys from Github
function get_public_keys () {
mkdir -m 700 -p ~/.ssh
for user in "$@"
do
curl -s https://github.com/"$user".keys >> ~/.ssh/authorized_keys
done
chmod 600 ~/.ssh/authorized_keys
}
@hising
hising / restart-nginx.sh
Created May 28, 2021 12:28
Restart nginx when fail starting after reboot
sudo fuser -k 80/tcp
sudo fuser -k 443/tcp
sudo service nginx restart