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
// https://www.princeawful.com/807/solved-text-selected-mouse-and-click | |
function SelectText(element) { | |
var doc = document | |
, text = doc.getElementById(element) | |
, range, selection | |
; | |
if (doc.body.createTextRange) { | |
range = document.body.createTextRange(); | |
range.moveToElementText(text); |
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
Installing sshfs | |
=================== | |
SSHFS is Linux based software that needs to be installed on your local computer. | |
On Ubuntu and Debian based systems it can be installed through apt-get. | |
sudo apt-get install sshfs | |
Mounting the Remote File System | |
=============================== |
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
Инсталација на фонтови | |
------------------------------------------------ | |
wget 10.10.10.98/fonts/infomatrix-fonts.zip | |
cd /usr/share/fonts/truetype/ | |
mkdir infomatrix | |
mv infomatrix-fonts.zip infomatrix | |
cd infomatrix | |
unzip infomatrix-fonts.zip | |
wget 10.10.10.98/fonts/msttcorefonts.zip |
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
export LANGUAGE=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
locale-gen en_US.UTF-8 | |
sudo dpkg-reconfigure locales |
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
# Installing PHP GeoIP on Ubuntu To make GeoIP work on PHP | |
# all the functions in http://php.net/manual/en/book.geoip.php | |
# php5-geoip and GeoCityLite.dat must be installed. | |
apt-get install php5-geoip | |
mkdir /usr/local/share/GeoIP | |
cd /usr/share/local/GeoIP | |
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | |
gunzip GeoLiteCity.dat.gz | |
service apache2 restart |
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 rm /var/lib/apt/lists/* -vf | |
sudo apt-get clean | |
sudo apt-get autoremove | |
sudo apt-get update | |
sudo apt-get dist-upgrade |
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
select | |
concat(round(rand() * 10000), | |
round(rand() * 10000), | |
round(rand() * 10000), | |
round(rand() * 10000) | |
) as rnd | |
; |
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
As root: | |
-------------------------------------------------------------------------------- | |
Generate monitor resolution string: | |
cvt 1680 1050 60 | |
Sample output: | |
# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz | |
Modeline "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync | |
-------------------------------------------------------------------------------- |
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
This is because locale-gen is using an archive file to store all the locales, but many utilities are still looking for the locale files. | |
Have a look at /usr/lib/locale/. If your output looks like this, read on: | |
ls /usr/lib/locale/ | |
C.UTF-8 locale-archive | |
The warning isn't critical, as far as I can tell, but if it bothers you or causes troubles, try the following in a terminal window: |
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
#!/bin/bash | |
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'|grep -E "(image|headers)" | xargs sudo apt-get -y purge |