Skip to content

Instantly share code, notes, and snippets.

Cong-Xin Cynthia Qiu ozooxo

Block or report user

Report or block ozooxo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ozooxo
ozooxo / gist:8962140
Created Feb 12, 2014
Run matlab in Ubuntu terminal: (Top one) quicker, but some plot-related functions seem not fully supported. (Bottom one) fully supported, but slower.
View gist:8962140
matlab -nojvm
matlab -nodesktop
@ozooxo
ozooxo / gist:8969388
Created Feb 13, 2014
merge two pdf files
View gist:8969388
pdftk HW1_word.pdf HW1_photo.pdf cat output HW1.pdf
@ozooxo
ozooxo / gist:9350235
Created Mar 4, 2014
Add matlab mime.types
View gist:9350235

My ubuntu just detects all .m files as Objective-C source code (text/x-objcsrc), so I'd like to add matlab mine.types to it. So I sudo gedit /etc/mime.types and add a line text/x-matlab m. If I want to automatically start matlab IDE, I should also add application/matlab m.

However, it seems not working at least in Ubuntu 12.04.

@ozooxo
ozooxo / gist:9927789
Last active Aug 29, 2015
Install gnome glib (ubuntu 12.04)
View gist:9927789
sudo apt-get install libglib2.0-dev
sudo apt-get install libgtk2.0-dev #optional
cat >hello.c <<EOL
#include <glib.h>
int main () {
return 0;
}
EOL
gcc `pkg-config --cflags glib-2.0` hello.c `pkg-config --libs glib-2.0` -o hello
@ozooxo
ozooxo / gist:11166222
Created Apr 22, 2014
Manually put location data into Android Emulator
View gist:11166222
beta@landlubber:~/Software/Android/sdk/platform-tools$ ./adb devices
beta@landlubber:~/Software/Android/sdk/platform-tools$ ./adb -s emulator-5554 emu geo fix -93.24 44.98
@ozooxo
ozooxo / gist:11165252
Created Apr 22, 2014
Android Emulator doesn't work (ubuntu 14.04 64bit)
View gist:11165252
# Error looks like "Failed to start emulator: Cannot run program "/home/beta/
# Software/Android/sdk//tools/emulator": error=2, No such file or directory".
# As people suggested, it works after
beta@landlubber:~/Software/Android/sdk/tools$ mv emulator emulator.bak
beta@landlubber:~/Software/Android/sdk/tools$ ln -s emulator64-arm emulator
@ozooxo
ozooxo / gist:11165806
Created Apr 22, 2014
Add i386 architecture in 64 bit ubunbu 14.04
View gist:11165806
# ./adb in Android Emulator doesn't work. It turns out that that executable file is 32 bit.
# beta@landlubber:~/Software/Android/sdk/platform-tools$ ./adb
# bash: ./adb: No such file or directory
# To install 32 bit architecture in a 64 bit ubunbu 14.04 machine, do
sudo dpkg --add-architecture i386
sudo apt-get -qqy update
sudo apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386
./adb install ~/workspace/facebook-android-sdk-3.8.0/bin/FBAndroid-7.0.0.apk
# It works :-)
@ozooxo
ozooxo / gist:11186985
Created Apr 22, 2014
Allow non-root users to capture packets from Wireshark (ubuntu 14.04)
View gist:11186985
beta@landlubber:~$ sudo apt-get install wireshark
beta@landlubber:~$ sudo dpkg-reconfigure wireshark-common # choose yes
beta@landlubber:~$ sudo usermod -a -G wireshark beta
beta@landlubber:~$ sudo reboot
View gist:eac810bd39f5db8c4d1b
montage -geometry 800x600+0+0 a.png b.png a+b.png
@ozooxo
ozooxo / gist:df4a28f40e0f52ed2909
Last active Aug 29, 2015
setup apache2 server on ubuntu 14.04
View gist:df4a28f40e0f52ed2909
beta@landlubber:~$ sudo apt-get install apache2
beta@landlubber:~$ sudo chown -R beta:beta /var/www/
beta@landlubber:~$ sudo chmod -R 777 /var/www/

beta@landlubber:~$ mkdir -p /var/www/dooqee

It seems that a local folder, e.g., /home/beta/Documents/localhost/rails doesn't work. I guess that's because apache2 doesn't have permission to read user files. I don't quite know how to set that up.

You can’t perform that action at this time.