Skip to content

Instantly share code, notes, and snippets.

View shroukkhan's full-sized avatar

Shrouk Hasan Khan shroukkhan

  • Softverk / Fingi / Thai-Fi
  • Bangkok
View GitHub Profile
@shroukkhan
shroukkhan / boostFixtureTestSuite
Last active December 13, 2015 22:09
boost test template eclipse ( test fixture )
${filecomment}
${includes}
#include <boost/test/unit_test.hpp>
using namespace std;
${namespace_begin}
@shroukkhan
shroukkhan / renameAndBuild.sh
Last active April 13, 2016 06:58
this script will rename csipsimple and build fingi usage is simple, call it the same way you call build.sh no change is needed to your existing code. the script will automatically download csipsimple and actionbarsherlock if not found. put this scripp in your app (android_app ) folder ( same directory as build.sh) and call it like this: ./rename…
#!/bin/bash
############ check arguments #################
if [ -z "$1" ]
then
echo "No argument supplied, please provide product name and build type. such as: ./renameAndBuild.sh aloft debug "
exit
fi
############ setting paths #################
@shroukkhan
shroukkhan / renameCSipSimple
Created February 15, 2013 14:11
renaming csip simple package
mkdir src/com/fingi
mv src/com.fingi.csipsimple.src/com/fingi/
find src/ -type f -print0 | xargs -0 sed -i 's/com.csipsimple./com.fingi.csipsimple./g' *.java
find res/ -type f -print0 | xargs -0 sed -i 's/com.csipsimple./com.fingi.csipsimple./g' *.xml
@shroukkhan
shroukkhan / loginShellWithIptables
Created February 14, 2013 07:41
#this script will log you in and then add your publip ip to the allowed list in iptables. #necessary because http is blocked by iptables for security reason
#!/bin/bash
login="root"
pass="PASSWORD"
ip="MY_IP_ADDRESS"
publicip=$(wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//')
sshpass -p $pass ssh $login@$ip "iptables -I INPUT -j ACCEPT -s $publicip"
sshpass -p $pass ssh $login@$ip
#this script will log you in and then add your publip ip to the allowed list in iptables.
#necessary because http is blocked by iptables for security reason