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 | |
# This script is used for create virtual hosts on CentOs. | |
# Created by alexnogard from http://alexnogard.com | |
# Improved by mattmezza from http://you.canmakethat.com | |
# Further Improved by bxmas13 from https://brianchristmas.com | |
# Feel free to modify it | |
# PARAMETERS | |
# | |
# $usr - User | |
# $dir - directory of web files |
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> | |
/* Put this in theme.liquid, preferably right before "</body>" */ | |
(function() { | |
var discountParam = document.location.search.match(/discount=(\w+)/); | |
if (discountParam && discountParam.length > 1) { | |
document.cookie = discountParam[0]; | |
} | |
})(); | |
</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
/* | |
Streamlined Shopify theme development. | |
NOTE: depends on module gulp-shopify-theme | |
npm install --save-dev yargs gulp gulp-sass gulp-changed gulp-sourcemaps gulp-autoprefixer gulp-uglify gulp-concat gulp-replace gulp-plumber gulp-babel browser-sync gulp-if del gulp-add-src gulp-rename gulp-yaml gulp-shopify-theme | |
Highlights: | |
- https proxying via BrowserSync |
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
{% comment %}Create a file called `google-remarketing.liquid` in the snippets subdirectory of your template with the following code. Be sure to insert your merchant ID.{% endcomment %} | |
{% if template contains 'index' %} | |
<script type="text/javascript"> | |
var google_tag_params = { | |
ecomm_pagetype: 'home', | |
}; | |
</script> | |
{% elsif template contains 'collection' %} | |
<script type="text/javascript"> | |
var google_tag_params = { |
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
public class TEBlackHole extends TileEntity | |
{ | |
//I use constant variables for this sort of thing | |
final int PULLRADIUS = 20; | |
final int KILLRADIUS = 3; | |
//Should updateEntity() be called? | |
@Override | |
public boolean canUpdate() | |
{ |
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
// eventUtility.js | |
var eventUtility = { | |
addEvent: function (el, type, fn) { | |
/* | |
el: HTML element object (DOM object) | |
type: event type to listen to | |
fn: function | |
*/ |
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 | |
# This script is used for create virtual hosts on CentOs. | |
# Created by alexnogard from http://alexnogard.com | |
# Improved by mattmezza from http://you.canmakethat.com | |
# Feel free to modify it | |
# PARAMETERS | |
# | |
# $usr - User | |
# $dir - directory of web files | |
# $servn - webserver address without www. |
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
{% assign array = 'c|c|b|b|a|a' | split: '|' %} | |
{% assign tags = array[1] %} | |
{% for item in array %} | |
{% unless tags contains item %} | |
{% capture tags %}{{ tags }}|{{ item }}{% endcapture %} | |
{% endunless %} | |
{% endfor %} | |
{{ tags | split: '|' | sort | join: ', ' }} |
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
<?php | |
class BlogController extends Controller | |
{ | |
/** | |
* Posts | |
* | |
* @return void | |
*/ | |
public function showPosts() |
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
var myConfObj = { | |
iframeMouseOver : false | |
} | |
window.addEventListener('blur',function(){ | |
if(myConfObj.iframeMouseOver){ | |
console.log('Wow! Iframe Click!'); | |
} | |
}); | |
document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){ |
NewerOlder