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
<form action="/cart/add" method="post"> | |
{% if product.variants.size > 1 %} | |
{% if product.options[0] %} | |
<label for="select-one">{{ product.options[0] }}</label> | |
<select id="select-one" onchange="letsDoThis()"> | |
{% for value in product.options_with_values[0].values %} | |
<option value="{{ value }}" {% if product.options_with_values[0].selected_value == value %}selected{% endif %}> | |
{{ value }} | |
</option> | |
{% endfor %} |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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"> | |
var rows = $.fn.matchHeight._rows($('.row')); | |
$.each(rows, function(i, row) { | |
$matchTarget = row.closest('.wrap').find('.target'); | |
row.matchHeight({ | |
target: $matchTarget | |
}); | |
}); | |
</script> |
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
A lot of people have asked me for this information over time and I've realized that it's not really published anywhere (that I can find) so posting it here for posterity. Hope this is helpful to the Ricoh GR1-series users out there. These instructions work with my GR1v and to my knowledge should also work with other models. Users of any other models should post corrections, if any, for their models so that those are documented. | |
Many people love the Ricoh GR1-series cameras but they are notorious for LCD failures. If your LCD goes out completely (or if you want to save some money by buying one with a dead LCD), the following steps describe how to always know what mode you're in so that you can continue to use the camera for the duration of it's life. Hopefully this'll help keep people using these cameras even if the LCD goes out. A dead LCD does not mean that you're Ricoh is useless and it probably still has a long life ahead of it. | |
In case your LCD goes out completely: | |
Resetting to Normal mode and accessi |
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
$('.blogroll').on('click', '.project-slider-prev', function(e){ | |
e.preventDefault(); | |
$slider = $(this).closest('.slider-wrapper').find('.project-slider'); | |
$slider.slick('slickPrev'); | |
}); |
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
$('article.post .entry-content a').not('[href*="mailto:"]').each(function () { | |
var isInternalLink = new RegExp('/' + window.location.host + '/'); | |
if ( ! isInternalLink.test(this.href) ) { | |
$(this).attr('target', '_blank'); | |
} | |
}); |
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
#!/bin/bash | |
USER="root" | |
PASSWORD="" | |
databases=`mysql -u $USER -p$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database` | |
for db in $databases; do | |
if [[ "$db" != "information_schema" ]] && [[ "$db" != "performance_schema" ]] && [[ "$db" != "mysql" ]] && [[ "$db" != _* ]] ; then | |
echo "Dumping database: $db" |
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
#!/bin/bash | |
USER="root" | |
PASSWORD="" | |
FILES="/Users/tenold/Backups/MySQL/*" | |
for f in $FILES | |
do | |
echo "Processing $f file..." |
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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @salcode | |
# ver 20150227 | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. |
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
define("Network.scroll", ["jQuery", "Support.position-fixed", "Support.css-transform"], function(a, b, c) { | |
function d() { | |
k = j.outerHeight(), h.css({ | |
position: "static", | |
width: "" | |
}), h.css({ | |
width: function() { | |
return h[0].getBoundingClientRect().width | |
}, | |
left: h.offset().left, |