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
To temporarily disable power management | |
$ sudo /sbin/iwconfig wlan0 power off | |
To turn off power management permanently | |
$ sudo vim /etc/pm/power.d/wireless | |
""" | |
#!/bin/sh | |
/sbin/iwconfig wlan0 power off | |
""" |
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
$ sudo add-apt-repository ppa:hanipouspilot/rtlwifi | |
$ sudo apt-get update | |
$ sudo apt-get install rtlwifi-new-dkms linux-firmware | |
$ sudo modprobe -r rtl8192se | |
$ sudo modprobe -v rtl8192se ips=N fwlps=N swlps=N debug=1 disable_watchdog=Y swenc=Y | |
$ echo 'options rtl8192se ips=N fwlps=N swlps=N debug=1 disable_watchdog=Y swenc=Y' | sudo tee /etc/modprobe.d/rtl8192se.conf | |
This will make rtl8191SEvA work better in Ubuntu. | |
To see what options are available in rtl8192se, you can |
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
# Add git branch if its present to PS1 | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ ' | |
fi |
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 using Ubuntu or Debian which runs on 64-bit architecture, try to install the following package: | |
sudo apt-get install lib32stdc++6 | |
sudo apt-get install lib32z1 | |
The program requires these package so that it could run in 64-bit environment. |
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
Download iAtkos S3v2 | |
Restore iAtkos S3 image to USB | |
Install Chameleon into USB | |
Boot iAtkos S3 USB with -v -x | |
Chameleon RC5, GraphicsEnabler=Yes, RTCFix, USBBusFix, VoodooHDA, PS2, dont pick VoodooBattery | |
After installation, boot with -v -x (remember to connect USB mouse and keyboard) | |
After setting up, reboot |
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
===To enter pg with user postgres=== | |
sudo su | |
su postgres | |
psql | |
-- to create roles -- | |
CREATE ROLES username PASSWORD 'password' INHERIT LOGIN | |
-- to alter roles -- | |
ALTER ROLES username [SUPERUSER/CREATEDB/CREATEROLE] | |
===To see current connection, user, password (host:port:db:user:password)=== |
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 Atom editor, the whitespace trailing removal is activated as default, which is annoying because it overrides your files without telling you then cause massive git diff in your project. | |
To disable this: | |
1. Go to Edit >> Preferences | |
2. Select Packages, search for whitespace, then click edit | |
3. untick Remove Trailing Whitespace | |
You are good to go. |
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
txtblk='\e[0;30m' # Black - Regular | |
txtred='\e[0;31m' # Red | |
txtgrn='\e[0;32m' # Green | |
txtylw='\e[0;33m' # Yellow | |
txtblu='\e[0;34m' # Blue | |
txtpur='\e[0;35m' # Purple | |
txtcyn='\e[0;36m' # Cyan | |
txtwht='\e[0;37m' # White | |
bldblk='\e[1;30m' # Black - Bold | |
bldred='\e[1;31m' # Red |
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
boot live cd | |
sudo add-apt-repository ppa:yannubuntu/boot-repair | |
sudo apt-get update | |
sudo apt-get install -y boot-repair | |
boot-repair |
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
Taken from: http://alexbachuk.com/launch-rails-4-application-with-passenger-and-nginx/ | |
ssh [email protected] SSH as root, using IP address and password you get by email | |
adduser alex Create new username, because using root is not recommended. | |
visudo Open sudo config file and add admin privileges to newly created user. | |
alex ALL=(ALL) ALL) add this and ctrl+x to save ‘y’ and enter to overwrite | |
sudo apt-get update update system packages | |
curl -L get.rvm.io | bash -s stable install ruby version manager | |
source ~/.rvm/scripts/rvm load RVM | |
rvm requirements install all RVM dependencies |