Skip to content

Instantly share code, notes, and snippets.

View Rudo2204's full-sized avatar

Rudo Rudo2204

View GitHub Profile
@jbgo
jbgo / git-recover-branch.md
Last active May 23, 2024 12:29
How to recover a git branch you accidentally deleted

UPDATE: A better way! (August 2015)

As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!

 $ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
@mesgarpour
mesgarpour / appsScript_ListFilesFolders_ver.2.js
Last active September 11, 2024 03:48
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/*
* Copyright 2017 Mohsen Mesgarpour
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active November 15, 2024 16:08
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
sudo apt-get install -y \
git \
g++ \
libgtk-3-dev \
gtk-doc-tools \
gnutls-bin \
valac \
intltool \
libtool \
libpcre2-dev \
@kenzouno1
kenzouno1 / Readme.md
Last active June 19, 2019 07:06
#1 Lấy điểm thi THPT các trang web *.edu.vn

Hướng dẫn sử dụng

  • Coppy nội dung file lay-diem-thi.js
  • Vào trang web cần ấy điểm
  • Bấm f12 vào tab console paste đoạn js vào sau đó thay đổi giá trị biến sbd. với mỗi mảng con trong biến này tương ứng minmax của 1 khoảng số báo danh
  • Enter chờ quét xong sẽ tự lưu file dạng json.

Good Luck

@zxchris
zxchris / debian-zoom-remove-ibus.md
Last active September 17, 2024 12:05
Zoom for Debian - Removing ibus dependency

Patching zoom_amd64.deb to remove ibus dependency

Installing ibus on Debian has a tendency to stop the keyboard working, particularly in KDE system dialogue boxes and search feilds. ibus is not really required, so patching the deb to prevent the install from also installing ibus as a required dependecy solves the problem:

S=$(mktemp -d)
dpkg -x zoom_amd64.deb $S
dpkg -e zoom_amd64.deb $S/DEBIAN
sed -i -E 's/(ibus, |, ibus)//' $S/DEBIAN/control 
dpkg -b $S zoom_amd64-no-ibus.deb 
@luckytyphlosion
luckytyphlosion / all_radical_red_trainer_sets_3_02.txt
Last active August 21, 2023 11:36
Pokémon Radical Red 3.02 Trainer Data (Normal Mode, Mingrind)
Anything without IVs means 0 IVs straight, not perfect IVs.
Used the same script to dump Pokémon Clover trainers. The internal trainer format is actually documented at Skeli's CFRU repository, but I didn't feel like writing a separate dumper, so I repurposed the Clover Lua script (link: https://github.com/luckytyphlosion/PokemonBizhawkLua/tree/radical-red) (tested with Bizhawk 2.8.2).
This dump applies to Normal Mode with Mingrind on.
Some trainer sets have random abilities on mons, which are denoted by "or" on the Ability line when applicable (e.g. Intimidate or Moxie)
The Pokémon levels of some trainers are dynamically determined based on the level of the Pokémon with the highest level in your party. A level of "Max Level" will set the enemy's level to your highest level, "Max Level - 1" to your highest level minus 1, and "Max Level - 2" to your highest level minus 2, and so on.