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(!(typeof console).match(/object/i)){ | |
| console = { log : function(a){ alert(a) } }; | |
| } |
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
| In /Library/Server/Mail/Config/postfix/main.cf add line: | |
| smtp_sasl_security_options = noanonymous |
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
| <snippet> | |
| <content><![CDATA[{% include '__localize' with 'l10n-${SELECTION/([a-zA-Z]+)(?:(\s+?)|\b)/?1:\L$1(?2:-)\E/g}' %}]]></content> | |
| <description>Wrap String in localization helper</description> | |
| </snippet> |
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
| mysqldump --skip-triggers --compact --no-create-info --complete-insert -u [db_user] -p [db_name] | sed '/schema_migrations/d' | gzip -c | ssh [remote_user]@[remote_host] 'cat > [remote_file].sql.gz' |
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
| When logged in, go to "Settings > Checkout > Checkout Language", click the "View and customize this translation" link. | |
| A page with a url like this opens: "https://yourshop.myshopify.com/admin/settings/locales/[locale_id]". | |
| copy [locale_id]. | |
| Go Back and choose "create a new one". | |
| Open the Javascript console, paste this (change to your shop/locale_id first): |
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
| function make_shipping_rates(id, low, mid, high) { | |
| $.post('/admin/price_based_shipping_rates.json', { | |
| price_based_shipping_rate: { | |
| country_id: id, | |
| min_order_subtotal: "0", | |
| max_order_subtotal: "500", | |
| name: "DHL Premiumversand", | |
| offsets: [], | |
| price: low | |
| } |
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
| RewriteCond %{HTTP_HOST} ^(www\.)?domain1\.com$ | |
| RewriteCond %{REMOTE_HOST} !^123\.234\.345\.456$ | |
| RewriteRule ^(.*)$ http://www.domain2.com/$1 [L,R=302] |
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
| From: https://discussions.apple.com/thread/4029413?start=0&tstart=0 | |
| For the local directory | |
| dscl . -list /Users GeneratedUID | |
| For a shared directory | |
| dscl /LDAPv3/127.0.0.1 -list /Users GeneratedUID |
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 works on openWRT: | |
| { echo -e "user\r"; echo -e "pass\r"; echo -e "reboot"; sleep 1; } | telnet ip.address.of.ipcam port | |
| on Linux/OSX you get away without the -e and \r, but busybox' telnet client needs them: | |
| { echo "user"; echo "pass"; echo "reboot"; sleep 1; } | telnet ip.address.of.ipcam port | |
| My cam is so well-made, it actually works with "admin" and "pass" literally, on port 88 |
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 | |
| LIMIT=45000000 | |
| USAGE=0 | |
| for dir in /path/to/stats/*/ | |
| do | |
| LOCAL_USAGE=`head -n 2 $dir/webalizer.hist | tail -n 1 | cut -d" " -f6` | |
| USAGE=$(($USAGE + $LOCAL_USAGE)) | |
| done |
OlderNewer