/src=["|'](.*\.js)[\"|\']/gi
/href=["|'](.*\.css)[\"|\']/gi
| #!/bin/bash | |
| find . -type d -exec chmod 755 {} \; | |
| find . -type f -exec chmod 644 {} \; | |
| chmod 744 cron.sh | |
| chmod 744 mage |
| SET FOREIGN_KEY_CHECKS=0; | |
| TRUNCATE `sales_flat_creditmemo`; | |
| TRUNCATE `sales_flat_creditmemo_comment`; | |
| TRUNCATE `sales_flat_creditmemo_grid`; | |
| TRUNCATE `sales_flat_creditmemo_item`; | |
| TRUNCATE `sales_flat_invoice`; | |
| TRUNCATE `sales_flat_invoice_comment`; | |
| TRUNCATE `sales_flat_invoice_grid`; | |
| TRUNCATE `sales_flat_invoice_item`; | |
| TRUNCATE `sales_flat_order`; |
| SET FOREIGN_KEY_CHECKS=0; | |
| -- reset customers | |
| TRUNCATE `customer_address_entity`; | |
| TRUNCATE `customer_address_entity_datetime`; | |
| TRUNCATE `customer_address_entity_decimal`; | |
| TRUNCATE `customer_address_entity_int`; | |
| TRUNCATE `customer_address_entity_text`; | |
| TRUNCATE `customer_address_entity_varchar`; | |
| TRUNCATE `customer_entity`; | |
| TRUNCATE `customer_entity_datetime`; |
| http://kvz.io/blog/2013/01/16/vagrant-tip-keep-virtualbox-guest-additions-in-sync/ | |
| + vagrant plugin install vagrant-vbguest - In same directory of Vagrantfile | |
| + sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions - If mount fails |
| @interface NSString (MD5) | |
| - (NSString *)MD5String; | |
| @end |
| override func viewDidLoad() | |
| { | |
| ... | |
| self.automaticallyAdjustsScrollViewInsets = true | |
| ... | |
| } |
| #!/bin/bash | |
| sudo apt-get -qq update | |
| sudo apt-get install -y python-software-properties | |
| sudo apt-get install -y build-essential | |
| sudo apt-get install -y zip | |
| sudo apt-get install -y apache2 | |
| sudo apt-get install -y curl | |
| #MySQL |
| <?php | |
| $ch = curl_init('https://www.howsmyssl.com/a/check'); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| $data = curl_exec($ch); | |
| curl_close($ch); | |
| $json = json_decode($data); | |
| echo "Connection uses " . $json->tls_version ."\n"; |
| <?php | |
| $dateString = '2019-01-21'; | |
| $originTimezone = 'America/New_York'; | |
| $date = new DateTime($dateString, new DateTimeZone($originTimezone)); | |
| $offset = $date->getOffset(); | |
| $utc = new DateTime($dateString, new DateTimeZone('UTC')); | |
| $interval = new DateInterval(sprintf('PT%sS', abs($offset))); |