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 npm cache clean -f | |
sudo npm install -g n | |
sudo n stable |
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
# Update theme variables | |
UPDATE variable SET value='s:7:"garland"' WHERE name = 'theme_default'; | |
UPDATE system SET status=1 WHERE name = 'garland'; | |
UPDATE system SET status=0 WHERE name = 'other_theme'; | |
# Truncate cache tables | |
TRUNCATE cache; | |
TRUNCATE cache_bootstrap; | |
TRUNCATE cache_block; |
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
nmcli is a command‐line tool for controlling NetworkManager. | |
Disconnect: | |
nmcli d disconnect iface wlan0 | |
Connect: | |
nmcli d wifi connect <WiFiSSID> password <WiFiPassword> iface wlan0 | |
Just change wlan0, <WiFiSSID>, <WiFiPassword> to reflect your setup. |
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
# Create and split file (4GB parts) | |
sudo tar -zcf - directory_or_file | split -b 4000m - part.tar.gz. | |
# Join all parts in one file | |
cat part.tar.gz.* > big-file.tar.gz | |
# Join all parts and extract (actual path) | |
cat part.tar.gz.* | tar xzf - |
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
chcon -R -t httpd_sys_content_t /home/user/html |
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
:: Uninstall visual studio, need admin permissions an patience | |
wmic product where "name like 'Microsoft Visual%'" call uninstall /nointeractive | |
wmic product where "name like 'Microsoft ASP%'" call uninstall /nointeractive | |
wmic product where "name like 'Microsoft SQL Server%'" call uninstall /nointeractive |
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
# Make your public key accessible | |
mkdir -m 700 /home/.ecryptfs/$USER/.ssh | |
echo $YOUR_PUBLIC_KEY > /home/.ecryptfs/$USER/.ssh/authorized_keys | |
ln -s /home/.ecryptfs/$USER/.ssh/authorized_keys ~/.ssh/authorized_keys | |
ecryptfs-umount-private | |
chmod 700 $HOME | |
mkdir -m 700 ~/.ssh | |
ln -s /home/.ecryptfs/$USER/.ssh/authorized_keys ~/.ssh/authorized_keys | |
# Make it auto-mount with first login. |
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
<?php | |
function cleanInput($input) { | |
$search = array( | |
'@<script[^>]*?>.*?</script>@si', // Strip out javascript | |
'@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags | |
'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly | |
'@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments | |
); |
NewerOlder