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
<IfModule mod_headers.c> | |
Header set Cache-Control "no-cache, no-store, must-revalidate" | |
Header set Pragma "no-cache" | |
Header set Expires 0 | |
</IfModule> |
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
DirectoryIndex index.php |
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 i = 0; | |
$('.class').each(function() { | |
i++; | |
var newID = 'section'+i; | |
$(this).attr('id',newID); | |
}); |
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 colors = {} | |
Cookie.set('main', '#333'); | |
$('#main').spectrum({ | |
color: Cookie.get('main'), // gets the value of the 'main' cookie and sets it as the initial color | |
change: function(color){ | |
colors.main = color.toHexString(); // returns the selected color as a hex string and assigns it to a 'main' property of the colors object | |
Cookie.set('main', colors.main); // updates the value of the 'main' cookie | |
} | |
}); |
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
<style> | |
input[type='text'] { | |
-webkit-appearance:textfield; | |
} | |
input[type='radio'] { | |
-webkit-appearance:radio; | |
} | |
input[type='checkbox'] { | |
-webkit-appearance:checkbox; | |
} |
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 keyNames = []; | |
// function to delete each key from storage one by one | |
deleteAllStorageData = function (array){ | |
for (i=0; i < array.length; i++) { | |
$.ajax({ | |
url: 'https://app.ecwid.com/api/v3/' + storeId + '/storage/' + array[i] + '?token=' + accessToken, | |
type: 'DELETE' | |
}) | |
} | |
console.log('DELETED'); |
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
RewriteCond %{HTTP_HOST} !^www\. | |
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] |
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 hidden, visibilityState, visibilityChange; | |
if (typeof document.hidden !== "undefined") { | |
hidden = "hidden", visibilityChange = "visibilitychange", visibilityState = "visibilityState"; | |
} | |
else if (typeof document.mozHidden !== "undefined") { | |
hidden = "mozHidden", visibilityChange = "mozvisibilitychange", visibilityState = "mozVisibilityState"; | |
} | |
else if (typeof document.msHidden !== "undefined") { | |
hidden = "msHidden", visibilityChange = "msvisibilitychange", visibilityState = "msVisibilityState"; | |
} |
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
enum ParserError: ErrorType { | |
case EmptyDictionary | |
case InvalidKey | |
} | |
struct Parser { | |
var data: [String : String?]? | |
func parse() throws { | |
guard let _ = data else { |
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
function increase_brightness(hex, percent){ | |
// strip the leading # if it's there | |
hex = hex.replace(/^\s*#|\s*$/g, ''); | |
// convert 3 char codes --> 6, e.g. `E0F` --> `EE00FF` | |
if(hex.length == 3){ | |
hex = hex.replace(/(.)/g, '$1$1'); | |
} | |
var r = parseInt(hex.substr(0, 2), 16), |
OlderNewer