The easiest way to show the file size in Terminal in Mac or Linux. ustins-MacBook-Pro:jpg juzhax$ file 001.jpg 001.jpg: JPEG image data, EXIF standard Justins-MacBook-Pro:jpg juzhax$ identify 001.jpg 001.jpg JPEG 720×468 720×468+0+0 8-bit sRGB 59.8KB 0.000u 0:00.009 Justins-MacBook-Pro:jpg juzhax$
Category Archives: Linux
command c expects followed by text error in Mac
You received error from the sed command in Mac, because the argument in mac is different. If you type in Mac terminal, you may receive error like this Justins-MacBook-Pro:2 juzhax$ sed -i ‘s/old_text/new_text/g’ example.txt sed: 1: “config.php”: command c expects \ followed by text The first argument should be the extension of the backup file. Continue reading “command c expects followed by text error in Mac”
Hacker’s Secret 100 Secret Techniques Revealed
One of the nice book that suitable for Hacker, but too bad it is in Japanese version. Wish someone will translate to English version in future. You can find the author from here Satoru Takabayashi, Fumitoshi Ukai, Yusuke Sato, Shinichiro Hamaji, Kazuyuki Shudo Chapter 1. Introduction 1. Introduction to Binary Hacks 2. Terminology of Binary Hacks 3. Using “file” to Continue reading “Hacker’s Secret 100 Secret Techniques Revealed”
use tcpdump to trace POST data in linux
tcpdump -s 0 -A ‘tcp dst port 80 and (tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)’
Remove ^M with VIM in linux
How I do to replace this with a ‘normal’ line break? Replace ^M to normal line break in many config files. :%s/<ctrl -V></ctrl><ctrl -M>//g </ctrl>
Find all files in Path and Cat all data from the file in Linux
find . -name ‘data*’ -exec cat {} \\;
Installing MySQL Plugin for NewRelic
wget https://github.com/newrelic-platform/newrelic_mysql_java_plugin/blob/master/dist/newrelic_mysql_plugin-1.2.0.tar.gz?raw=true mv newrelic_mysql_plugin-1.2.0.tar.gz\?raw\=true newrelic_mysql_plugin-1.2.0.tar.gz tar -zvxf newrelic_mysql_plugin-1.2.0.tar.gz cd newrelic_mysql_plugin-1.2.0 yum install java-1.7.0-openjdk java -version cp config/template_newrelic.properties config/newrelic.properties vim config/newrelic.properties cp config/template_mysql.instance.json config/mysql.instance.json vim config/mysql.instance.json java -jar newrelic_mysql_plugin*.jar nohup java -jar newrelic_mysql_plugin*.jar &
Set Static IP for Raspberry Pi
vi /etc/network/interfaces modify iface eth0 inet dhcp to iface eth0 inet static Then add this below address 192.168.1.200 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1
GA-H87-D3H F3 F6 F5 F6c BIOS
Gigabyte GA-H87-D3H BIOS My Gigabyte H87-D3H freeze randomly and I’m trying to try all the BIOS to test. Here are the link that i found for the oldest and beta BIOS. mb_bios_ga-h87-d3h_f3.exe mb_bios_ga-h87-d3h_f4.exe mb_bios_ga-h87-d3h_f5.exe H87D3H-2.F6c I found some of the users comments Change graphic card from AMD to NVidia -> Intel network card working without Continue reading “GA-H87-D3H F3 F6 F5 F6c BIOS”
PHP message: PHP Fatal error: Class ‘WP_List_Table’ not found in
PHP message: PHP Fatal error: Class ‘WP_List_Table’ not found in You may see this error in WordPress while disabled some plugin, because they plugin is need to use the WP_List_Table class from the WordPress. Solving the problem Add this to any of your activated plugin the it will load the class if it is not Continue reading “PHP message: PHP Fatal error: Class ‘WP_List_Table’ not found in”
