This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# just the most essential stuff | |
abbr ga 'git add' | |
abbr gs 'git status' | |
abbr gb 'git branch' | |
abbr gcom 'git commit' | |
abbr gd 'git difftool --no-prompt' | |
abbr gdd 'git difftool --dir-dif' | |
abbr gco 'git checkout' | |
abbr gpr 'git pull --rebase' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int day = int.Parse(ssn.Substring(0, 2)); | |
int month = int.Parse(ssn.Substring(2, 2)); | |
int year = int.Parse(ssn.Substring(4, 2)); | |
int ruleNumber = int.Parse(ssn.Substring(6, 3)); | |
int birthYear = 0; | |
// Rule 1. 500–749: 1854–1899 | |
if (year >= 54 && ruleNumber >= 500 && ruleNumber <= 749) | |
{ | |
birthYear = 1800 + year; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int birthYear = (ruleNumber, year) switch | |
{ | |
// Rule 1. 500–749: 1854–1899 | |
(>= 500 and <= 749, >= 54) => 1800 + year, | |
// Rule 2. 000–499: 1900–1999 | |
(< 500, _) => 1900 + year, | |
// Rule 3. 900–999: 1940–1999 | |
(>= 900, >= 40) => 1900 + year, | |
// Rule 4. 500–999: 2000–2039 | |
(>= 500, <= 39) => 2000 + year, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int firstDigit = int.Parse(ssn.Substring(0, 1)); | |
int thirdDigit = int.Parse(ssn.Substring(2, 1)); | |
string type = (firstDigit, thirdDigit) switch | |
{ | |
(8 or 9, _) => "FH", | |
( >= 4 and <= 7, _) => "D", | |
(_, 4 or 5) => "H", | |
_ => null | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npx react-native bundle | |
--platform ios | |
--dev false | |
--reset-cache | |
--entry-file index.js | |
--bundle-output main.jsbundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npx react-native bundle | |
--platform android | |
--dev false | |
--reset-cache | |
--entry-file index.js | |
--bundle-output index.android.bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./node_modules/hermes-engine/osx-bin/hermesc | |
-emit-binary | |
-out android.bytecode.hbc | |
index.android.bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -rf Payload/MyApp.app/\_CodeSignature | |
codesign -d | |
--entitlements :- "Payload/MyApp.app" | |
> entitlements.plist | |
codesign -f | |
-s "<My Certificate Name In Keychain>" | |
--entitlements entitlements.plist Payload/MyApp.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jarsigner | |
-keystore <keystore-name>.jks | |
-storepass '<storepass>' | |
-keypass '<keypass>' | |
-sigalg MD5withRSA | |
-digestalg SHA1 | |
-signedjar myapp-signed.apk | |
myapp-modified.apk | |
<key alias> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Library/Android/sdk/build-tools/29.0.2/zipalign | |
-f 4 | |
myapp-signed.apk | |
myapp-signed-realigned.apk |