Skip to content

Instantly share code, notes, and snippets.

View hide0123's full-sized avatar
👋
Hi

hide0123

👋
Hi
  • Japan
View GitHub Profile
@hide0123
hide0123 / .bashrc
Created February 14, 2022 15:53
ghq + peco
alias repo='cd $(ghq list -p | peco)'
alias reporm='rm -rf $(ghq list -p | peco)'
syntax enable
colorscheme industry
set tabstop=4
set expandtab
set shiftwidth=4
set autoindent
set smartindent
@hide0123
hide0123 / constbf.nim
Created November 10, 2021 15:26
Compile-time brainf*ck execution written in Nim
proc interpret(code: string): string =
var
str = ""
output = ""
pos = 0
codePos = 0
proc run(skip = false): bool =
while codePos < code.len:
if pos >= str.len:
import json, requests, sys
def get_github_email(user):
base_url = 'https://api.github.com/users/' + user
event_url = base_url + '/events/public'
try:
base = json.loads(requests.get(base_url).text)
event = json.loads(requests.get(event_url).text)
except:
@hide0123
hide0123 / push.yml
Created May 23, 2021 14:15
Trigger an action when a code is pushed.
name: Push trigger event
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
@hide0123
hide0123 / bubblesort.s
Created December 17, 2020 08:12
Bubble sort in ARM assembly
.text
.global main
.extern printf
@----------------------------
@ r0 = table
@ r1 = table length
@ r2 = table length - 4
@ r3 = outer loop counter
@ r4 = inner loop counter
@hide0123
hide0123 / helloasm_CTR.s
Last active April 17, 2021 15:01
"Hello, world!" in ARM assembly for 3DS
.text
.global main
main:
@ Init
push {lr}
bl gfxInitDefault
mov r0, #0
mov r1, #0
@hide0123
hide0123 / count.py
Created September 4, 2020 14:02
Spotify play counter (and input the data in the excel file)
import json
import collections
import openpyxl
with open('StreamingHistory0.json', 'r', encoding='utf-8') as f:
d = json.load(f)
list = []
search_all = str(input('Search for all? (y/n) >> '))
@hide0123
hide0123 / 3gxlibanalyze.bat
Last active November 1, 2020 01:53
3gx library analyzer
@echo off
echo [Member list]
ar t Lib/libCTRPluginFramework.a
set object=
echo;
set /p object="Enter the object name: "
echo;
ar x Lib/libCTRPluginFramework.a %object%.o
arm-none-eabi-objdump -D %object%.o > %object%.s
if not %errorlevel% == 0 (