Skip to content

Instantly share code, notes, and snippets.

# 3D Models
*.3dm filter=lfs diff=lfs merge=lfs -text
*.3ds filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
*.c4d filter=lfs diff=lfs merge=lfs -text
*.collada filter=lfs diff=lfs merge=lfs -text
*.dae filter=lfs diff=lfs merge=lfs -text
*.dxf filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.glb filter=lfs diff=lfs merge=lfs -text
@nopjia
nopjia / onChange.js
Created April 19, 2019 18:17
Creates a new object that watches for changes on its properties
/**
* Callback whenever a property in the object changes
* @callback onChangeCallback
* @param {*} newValue
* @param {*} oldValue
* @param {String} path
*/
/**
* Creates a new object that is watched for changes
@nopjia
nopjia / git-change-author.sh
Created April 17, 2019 19:05
Bash script for changing git author info
#!/bin/sh
# https://help.github.com/en/articles/changing-author-info
git filter-branch --env-filter "
OLD_EMAIL=\"$1\"
CORRECT_NAME=\"$2\"
CORRECT_EMAIL=\"$3\"
if [ \"\$GIT_COMMITTER_EMAIL\" = \"\$OLD_EMAIL\" ]
@nopjia
nopjia / new-ubuntu-install.md
Last active October 15, 2021 20:55
Configuring a new Ubuntu installation

New Ubuntu Install

Ubuntu 20.04.3 LTS

Settings

  • Power > When the Power Button is pressed
  • Displays > Night Light on
  • Nautilus > Hamburger Menu > Show Hidden Files
@nopjia
nopjia / .eslintrc.js
Created February 19, 2018 15:00
Nop's personal eslintrc
module.exports = {
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module",
},
"env": {
"browser": true,
},
@nopjia
nopjia / magikarpjump-masterleague.sh
Created January 11, 2018 23:27
ADB bash script for auto-clicking through Magikarp Jump Master League
# Magikarp Jump
# Master League Automated Clicker
#
# Notes:
#
# All tap positions are hardcoded to my OnePlus3.
# Please re-adjust positions if phone resolution is different.
#
# Any league-triggered event will interrupt this script.
#
@nopjia
nopjia / magikarpjump-dateloop.sh
Last active January 11, 2018 23:23
ADB bash script for auto-clicking through the date settings exploit in Magikarp Jump
# Magikarp Jump
# Date Settings Exploit Automated Clicker
#
# Instructions:
#
# Connect Android USB Debugging and run in "adb shell".
# Open Android Settings to the Date page and have it be the most recent app.
# Adjust values marked "VARIABLE" accordingly.
# Adjust the number of repetitions as you like.
#
@nopjia
nopjia / magikarpjump-expert3.sh
Last active October 14, 2018 12:42
ADB bash script for auto-clicking through Magikarp Jump Elite League 3
# Magikarp Jump
# Expert League 3 Automated Clicker
#
# Notes:
#
# All tap positions are hardcoded to my OnePlus3.
# Please re-adjust positions if phone resolution is different.
#
# Any league-triggered event will interrupt this script.
# It is best that level is maxed out before starting the league.
@nopjia
nopjia / splitPath.js
Last active November 7, 2022 16:22
The ultimate split path, with a single regex
/**
* The ultimate split path.
* Extracts dirname, filename, extension, and trailing URL params.
* Correct handles:
* empty dirname,
* empty extension,
* random input (extracts as filename),
* multiple extensions (only extracts the last one),
* dotfiles (however, will extract extension if there is one)
* @param {string} path
@nopjia
nopjia / basename.js
Created September 25, 2015 00:29
basename & dirname
var basename = function(path) {
return path.replace(/\\/g, "/").replace( /.*\//, "");
};
var dirname = function(path) {
return path.replace(/\\/g, "/").replace(/\/[^\/]*$/, "");
};