Skip to content

Instantly share code, notes, and snippets.

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,
@skillmatic-co
skillmatic-co / .gitignore
Created November 5, 2015 20:15 — forked from salcode/.gitignore
WordPress .gitignore - this is my preferred gitignore file when working with WordPress. It ignores almost all files by default.
# -----------------------------------------------------------------
# .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.
#!/bin/bash
USER="root"
PASSWORD=""
FILES="/Users/tenold/Backups/MySQL/*"
for f in $FILES
do
echo "Processing $f file..."
#!/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"
@skillmatic-co
skillmatic-co / gist:2628499769383b3bbbeb24a739544d08
Last active August 22, 2016 14:57 — forked from wpscholar/jquery.external-links-new-window.js
Open all external links in a new window
$('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');
}
});
$('.blogroll').on('click', '.project-slider-prev', function(e){
e.preventDefault();
$slider = $(this).closest('.slider-wrapper').find('.project-slider');
$slider.slick('slickPrev');
});
@skillmatic-co
skillmatic-co / instructions.txt
Created June 5, 2017 17:53
How to indefinitely use the Ricoh GR1V even if the LCD fails
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
@skillmatic-co
skillmatic-co / matchheight.html
Last active February 6, 2018 18:45
jQuery MatchHeight by specific target in each row
<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>
@skillmatic-co
skillmatic-co / mysql-docker.sh
Created October 31, 2019 17:18 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# 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
@skillmatic-co
skillmatic-co / Much much simpler option selector for Shopify
Last active November 25, 2021 18:49 — forked from zakhardage/Much much simpler option selector for Shopify
Much simpler version of Shopify's option_selection.js for separating product options into their own dropdown menus.
<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 %}