This file contains hidden or 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
Disable csrutils: | |
Startup -> Cmd + R -> terminal -> `csrutil disable;reboot` | |
Download and install mobile partner: | |
http://download-c1.huawei.com/download/downloadCenter?downloadId=90143&version=352019&siteCode=worldwide | |
Create profile and connect. |
This file contains hidden or 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 f in `find . -name "*.dust"`;do sed -i.bkp "s/label=\"{@pre editable=\"false\"/label=\"{@pre encode=\"true\"/" $f; done | |
for file in `find ./ -name "*.bak"`; do rm $file; done; |
This file contains hidden or 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
# enable color support of ls and also add handy aliases | |
if [ -x /usr/bin/dircolors ]; then | |
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
alias ls='ls --color=auto' | |
#alias dir='dir --color=auto' | |
#alias vdir='vdir --color=auto' | |
alias grep='grep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias egrep='egrep --color=auto' |
This file contains hidden or 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
In ~/ | |
.bashrc | |
.bash_history | |
In gnome | |
with more plugins, .local/share/gnome-shell | |
app preferences(terminal key bindings, etc), .gconf | |
.viminfo | |
.vim_rc | |
.mozilla |
This file contains hidden or 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
Opening evince as root : | |
sudo ln -s /etc/apparmor.d/usr.bin.evince /etc/apparmor.d/disable | |
sudo /etc/init.d/apparmor restart | |
opening vlc as root : | |
change geteuid to getppid in /usr/bin/vlc |
This file contains hidden or 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
/etc/hostapd/hostapd.conf | |
interface=wlan1 | |
driver=nl80211 | |
ssid=hotspot | |
hw_mode=g | |
channel=1 | |
auth_algs=1 | |
ignore_broadcast_ssid=0 | |
wpa=3 |
This file contains hidden or 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
//obj is object of a class | |
var params : Array[String] = obj.getClass.getMethods.map(_.getName) | |
var j : Int = 0 | |
while ({j < params.length}){ | |
println(params(j)) | |
j = j + 1 | |
} |
This file contains hidden or 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
public function prepareTemplate( Text_Template $template ) { | |
$template->setVar( array( | |
'constants' => '', | |
'zz_constants' => PHPUnit_Util_GlobalState::getConstantsAsString() | |
)); | |
parent::prepareTemplate( $template ); | |
} |
This file contains hidden or 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
If you are gonna use same version of ubuntu, before installing take backup of software names using : | |
dpkg --get-selections > installed-software | |
After installing use following commands: | |
dpkg --set-selections < installed-softwares | |
apt-get -u dselect-upgrade | |
Installing java : | |
openjdk-7-jdk | |
or for sun java, |
This file contains hidden or 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
class GetJSONFromUrl extends AsyncTask<String, Void, RSSFeed> { | |
InputStream is = null; | |
String result = ""; | |
String error_text=""; | |
JSONObject j = null; | |
protected void doInBackground(String... urls) { | |
// http post |
NewerOlder