Skip to content

Instantly share code, notes, and snippets.

nanusdad /
Last active Mar 6, 2018
Bitnami Wordpress Admin Password Change
cd /opt/bitnami/apps/wordpress/
sudo ./bnconfig --userpassword YOUR_NEW_PASSWORD
$stdout ='console.out', 'w')

#You may also need to call this once:

$stdout.sync = true
nanusdad /
Last active Nov 16, 2017
Android APK with Ionic and Mac

Using Ionic to build Android APK on Mac

  • Install NodeJS
  • Install ionic and cordova
npm install -g ionic cordova
  • Might need to install node-sass
  • Requires CocoaPods
sudo gem install cocoapods
nanusdad /
Last active Dec 15, 2020
Express JS with GoDaddy SSL Certificates

How to use GoDaddy SSL certs with Express JS

  • Node requires each certificate in the CA chain to be passed separately in an array.
  • GoDaddy provides a cerficate file (gd_bundle.crt) probably looks like this:
nanusdad /
Last active Mar 30, 2017
Building with openssl


make dclean
make clean
./config --openssldir=/home/locallinux/lib/openssl no-zlib no-shared
make depend
make test
make all
make install
nanusdad / readingURLquerydetails.html
Created Dec 8, 2016
HTML / JS code to read and process URL query details
View readingURLquerydetails.html
<title>Confirmation Form</title>
<p id="demo">
nanusdad /
Last active Nov 4, 2016
Watermarking with ImageMagick

From StackOverflow

Watermarking with an image is as simple as

composite -dissolve 30% -gravity south watermark.jpg input-file.jpg output-file.jpg

Using the above command as an example, a Bash command for doing this to all files in folder would be:

nanusdad /
Last active Jan 30, 2019
Inserting data from JSON files into mongo

Inserting data into mongo collection from JSON file

var file = cat('./20-new.json');  # file name
use testdb                        # db name
var o = JSON.parse(file);         # convert string to JSON
db.forms.insert(o)                # collection name

Inserting data using 'meteor mongo' into collection from JSON file

nanusdad /
Last active Nov 28, 2015
Excel to CSV to MySQL
  1. Save Excel worksheet as .csv file
  • might need to change new line characters
  • if saving on Mac - open in vi and run %s/^M/\r/g ( ctrl+M )
  1. Use the following example to load in CSV file from mysql prompt -
    load data infile '/tmp/tc_t.csv' 
    into table new_test_categories 
    fields terminated by ','    
nanusdad / APK_signing
Last active Apr 28, 2016
APK file signing and zipping for Play Store upload
View APK_signing
cd ~/build-output-directory/android/
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 unaligned.apk your-app-name
$ANDROID_HOME/build-tools/23.0.0/zipalign 4 unaligned.apk production.apk
# To unsign APK
zip -d yourapp.apk "META-INF*"
# Creating keystore and then signing app for Play Store