This file contains 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
git checkout master | |
git reset --hard e3f1e37 | |
git push --force origin master | |
# Then to prove it (it won't print any diff) | |
git diff master..origin/master |
This file contains 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
LOAD DATA INFILE 'file.csv' INTO TABLE table_name | |
FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '"' | |
LINES TERMINATED BY '\r\n' | |
IGNORE 1 LINES | |
(col_name); |
This file contains 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
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch | |
## add .DS_Store to .gitignore | |
git add .gitignore | |
git commit -m '.DS_Store banished!' |
This file contains 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
# First of all make sure that the user is added to the group (the group name here is www-data) | |
sudo usermod -a -G www-data <some_user> | |
# Then change the group of the directory | |
sudo chgrp -R www-data /var/www | |
# Finally, give group write permissions | |
sudo chmod -R g+w /var/www |
This file contains 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 | |
$country_name=Mage::app()->getLocale()->getCountryTranslation($country_code); | |
?> |
This file contains 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 | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Academic Free License (AFL 3.0) | |
* that is bundled with this package in the file LICENSE_AFL.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/afl-3.0.php |
This file contains 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
<script type="text/javascript"> | |
(function($) { | |
$.fn.countTo = function(options) { | |
// merge the default plugin settings with the custom options | |
options = $.extend({}, $.fn.countTo.defaults, options || {}); | |
// how many times to update the value, and how much to increment the value on each update | |
var loops = Math.ceil(options.speed / options.refreshInterval), | |
increment = (options.to - options.from) / loops; |
This file contains 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
nc -u -w 2 -v 159.89.213.212 13543 |
This file contains 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 ufw status | |
sudo ufw disable | |
sudo ufw default deny incoming | |
sudo ufw default allow outgoing | |
This file contains 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 iptables -L -n -v | |
sudo netstat -plutn |