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
<?php | |
/* Caveat: I'm not a PHP programmer, so this may or may | |
* not be the most idiomatic code... | |
* | |
* FPDF is a free PHP library for creating PDFs: | |
* http://www.fpdf.org/ | |
*/ | |
require("fpdf.php"); | |
class PDF extends FPDF { |
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
android.useAndroidX=false | |
android.enableJetifier=false |
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
Rebuild Bundle | |
`react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res` | |
error: Duplicate file. Original is here. The version qualifier may be implied. | |
`rm -rf android/app/src/main/res/drawable-xxxhdpi android/app/src/main/res/drawable-xxhdpi android/app/src/main/res/drawable-xhdpi android/app/src/main/res/drawable-mdpi android/app/src/main/res/drawable-hdpi` | |
`cd android && ./gradlew assembleRelease` |
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
sudo chown -R `whoami` ~/.npm | |
sudo chown -R `whoami` /usr/local/lib/node_modules |
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
for (NSString* family in [UIFont familyNames]) | |
{ | |
NSLog(@"%@", family); | |
for (NSString* name in [UIFont fontNamesForFamilyName: family]) | |
{ | |
NSLog(@" %@", name); | |
} | |
} |
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
#!/usr/bin/env bash | |
shopt -s globstar | |
numberRegex='^[0-9]+$' | |
for d in static/* static/**/* ; do | |
if [ -d ${d} ]; then | |
bn=$(basename $d) | |
# We only care about media resources | |
if [[ "$bn" = "images" || ("$bn" = "videos" || "$bn" = "sounds") ]]; then | |
for filepath in $(ls $d) ; do |
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
#!/bin/bash | |
formail -R cc X-original-cc \ | |
-R to X-original-to \ | |
-R bcc X-original-bcc \ | |
-f -A"To: new@email.com" \ | |
| /usr/sbin/sendmail -t -i | |
# pipe all to a log instead, comment out formail code | |
#tee -a /tmp/trapmail.log > /dev/null |