Skip to content

Instantly share code, notes, and snippets.

@1-800-jono
1-800-jono / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@1-800-jono
1-800-jono / wpml_conditional.php
Created October 20, 2014 16:43
WPML Wordpress plugin conditionals for multi-language content
<?php if (ICL_LANGUAGE_CODE == 'es') { echo 'Español content'; } elseif (ICL_LANGUAGE_CODE == 'pt-br') { echo 'PT brazil content'; } else { echo 'Deafult language - english';}?>
@1-800-jono
1-800-jono / placeholder_color.css
Created October 21, 2014 17:26
Input placeholder color CSS
input::-webkit-input-placeholder {
color: #000;
}
input:-moz-placeholder { /* Firefox 18- */
color: #000;
opacity: 1;
}
input::-moz-placeholder { /* Firefox 19+ */
@1-800-jono
1-800-jono / get_category_link_wpml.php
Created October 22, 2014 18:41
Get category link for use with WPML plugin. The number is for category ID.
@1-800-jono
1-800-jono / option_go_to_url.js
Created November 6, 2014 19:30
Use option value in select element to go to a URL. Replace "catUrl" with select name value.
jQuery(function(){
jQuery('select[name="catUrl"]').change(function() {
window.location.replace($(this).val());
});
});
@1-800-jono
1-800-jono / make_table_responsive.scss
Last active August 29, 2015 14:18
Sass mixin for making tables responsive
@mixin responsive-table($thead-title...) {
table {
width: 100%;
border-collapse: collapse;
}
@media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width: 1024px) {
/* Force table to not be like tables anymore */
@1-800-jono
1-800-jono / Sortable List using Angularjs and ng-sortable.markdown
Created October 8, 2015 02:17
Sortable List using Angularjs and ng-sortable

Sortable List using Angularjs and ng-sortable

Drag and drop sortable list with click sound

A Pen by Jonathan on CodePen.

License.

@1-800-jono
1-800-jono / post_content.sql
Created December 2, 2015 18:19
Search and replace SQL query for Wordpress after migration
UPDATE wp_posts SET post_content = replace(post_content, 'http://oldsite.com/','http://newsite.com')
@1-800-jono
1-800-jono / git_ignore_after_commit
Created March 28, 2016 18:19
Git ignore files after commit :)
//Check what files are going to be ignored
git ls-files -ci --exclude-standard
//Add those files to git ignore
git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached
@1-800-jono
1-800-jono / Canvas background color change on scroll.markdown
Created June 17, 2016 19:47
Canvas background color change on scroll

Canvas background color change on scroll

This is in process right now. The idea is to have color animation on scroll with canvas.

A Pen by Jonathan on CodePen.

License.