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
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
===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
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
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
# 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
$ 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
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
# set regional to BO (Bolivia) since they allow use of 1000 mW tx-power | |
set-bo: | |
sudo ifconfig wlan0 down | |
sudo iw reg set BO | |
sudo ifconfig wlan0 up | |
iwconfig wlan0 | |
# Side effects: | |
# overheating of the power amplifier chip and the card which will cause lower efficiency and more data errors; | |
# overdriving the amplifier which will cause more data errors; |
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
Follow the WORKAROUND: | |
1. Add a comand to /etc/rc.local, add the following line above "exit 0": | |
setpci -s 00:1c.2 0x50.B=0x41 | |
2. Add the same comand to /etc/apm/resume.d/21aspm (which does not exist yet): | |
setpci -s 00:1c.2 0x50.B=0x41 | |
3. Add the following to /etc/modprobe.d/sdhci.conf: | |
options sdhci debug_quirks2=4 | |
4. Re-generate initrd: | |
sudo update-initramfs -u -k all | |
5. Reboot or reload sdhci module: |