Skip to content

Instantly share code, notes, and snippets.

View youngchief-btw's full-sized avatar
👋
chat with me!

YoungChief youngchief-btw

👋
chat with me!
View GitHub Profile
@youngchief-btw
youngchief-btw / removeXcodePersonalInfo.bash
Created August 2, 2022 18:15
Remove personal info from an Xcode project.
ProjectName="ExampleApp"
rm -rf "$ProjectName.xcodeproj/xcuserdata"
rm -rf "$ProjectName.xcodeproj/project.xcworkspace"
rm -rf "$ProjectName.xcodeproj/project.xcworkspace/xcuserdata"
@youngchief-btw
youngchief-btw / youngchief_pgp_pub.pem
Last active October 28, 2021 01:32
My public PGP key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGFg6O8BEADLeSDiB8u/qE95Uqi+qsAAPzG3sT7Ryh8RZU4PYm1HmZzk5r5z
n10bC0vMu1a1xanBgFgmAHjK+Y36cuIQbl4vwyUPDKaqezQXI/2nyHA+X3LZ8zGo
Voy0fYXVkToqhFG9OPbHUERfJCo9UYtk8RLX05ze+VNRWsYWqSbzPldQFaw5HU+8
QPDvYHFZ0jEzaTRnnd5ZNgxpheNTP1z0KjLWA737UuE/RHtuue37jWl0vGANREKo
ro4fNBuzrJ/PxrCREj/ZKTgqz0xJ4YseJqp7G4djZ/inVsGzarRwOQZ63VdyCj95
rEl/VXtbgpYWaV/qhocglEXXaGMQD5qoJyzh8j6HWZKCBnHiBDscdNCZiTV6VfoK
xMnKbgi73IHzMeIRrbhwVzXKcIKVlUbVyM8yXKaXwjh8CZAWoxIcd7BABFJnVL0n
oSnCusSX+Az4qdv8ZiV6r2slXnLGz646TBtmDN61p8Bac0E0EzG6Ywellr3MATE/
@youngchief-btw
youngchief-btw / test.txt
Last active October 28, 2021 00:32
Test
test
@youngchief-btw
youngchief-btw / keybase.md
Created October 8, 2021 23:26
keybase.md

Keybase proof

I hereby claim:

  • I am youngchief-btw on github.
  • I am youngchief (https://keybase.io/youngchief) on keybase.
  • I have a public key ASAPJ7hXY7z7CtSEVpplBF9XL8saDq6g9pL096V1XKK5-wo

To claim this, I am signing this object:

@youngchief-btw
youngchief-btw / RenameGitBranch.sh
Last active October 27, 2020 17:10
Rename a Local and Remote Git Branch (ex. master --> main)
#!/bin/bash
OLD_NAME=master
NEW_NAME=main
git checkout $OLD_NAME;
git branch -m $NEW_NAME;
# If already on remote do the following:
git push origin -u $NEW_NAME;
git push origin --delete $OLD_NAME:
@youngchief-btw
youngchief-btw / getUrlVars.js
Last active July 8, 2020 19:11
Get URL Parameters in JS
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(
m,
key,
value
) {
vars[key] = value;
});
return vars;
@youngchief-btw
youngchief-btw / XMLHttpRequestFUNC.js
Last active August 17, 2020 01:34
A function that does XMLHttpRequest handling and such
function XMLHttpRequestFUNC(method, url, async) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
console.log(xhr.response);
return;
}
};
xhr.open(method, url, async); // arguments[#]
// xhr.setRequestHeader("User-Agent", "https://youngchief-btw.github.io/"); // header, value
@youngchief-btw
youngchief-btw / HTTP --> HTTPS.js
Last active December 8, 2021 00:13
HTTP --> HTTPS enforcement in Javascript
// HTTP --> HTTPS
if (location.protocol === "http:") {
location.replace(window.location.href.replace("http:", "https:"));
}
@youngchief-btw
youngchief-btw / CODEOWNERS
Created February 26, 2020 22:12
CODEOWNERS ~ Example
# This is a comment.
# Each line is a file pattern followed by one or more owners.
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @global-owner1 @global-owner2
# Order is important; the last matching pattern takes the most