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
/** | |
* NetteForms - simple form validation. | |
* | |
* This file is part of the Nette Framework. | |
* Copyright (c) 2004, 2014 David Grudl (http://davidgrudl.com) | |
*/ | |
var Nette = Nette || {}; | |
Nette.errors = []; |
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
// Breakpoints | |
// ------------------------- Source: http://blog.scur.pl/2012/06/variable-media-queries-less-css/ | |
@highdensity: ~"only screen and (-webkit-min-device-pixel-ratio: 1.5)", | |
~"only screen and (min--moz-device-pixel-ratio: 1.5)", | |
~"only screen and (-o-min-device-pixel-ratio: 3/2)", | |
~"only screen and (min-device-pixel-ratio: 1.5)"; | |
@mobile: ~"only screen and (max-width: 529px)"; | |
@tablet: ~"only screen and (min-width: 530px) and (max-width: 949px)"; | |
@desktop: ~"only screen and (min-width: 950px) and (max-width: 1128px)"; | |
@desktop-xl: ~"only screen and (min-width: 1129px)"; |
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 | |
function isEmail($value) | |
{ | |
$atom = "[-a-z0-9!#$%&'*+/=?^_`{|}~]"; // RFC 5322 unquoted characters in local-part | |
$localPart = "(?:\"(?:[ !\\x23-\\x5B\\x5D-\\x7E]*|\\\\[ -~])+\"|$atom+(?:\\.$atom+)*)"; // quoted or unquoted | |
$alpha = "a-z\x80-\xFF"; // superset of IDN | |
$domain = "[0-9$alpha](?:[-0-9$alpha]{0,61}[0-9$alpha])?"; // RFC 1034 one domain component | |
$topDomain = "[$alpha](?:[-0-9$alpha]{0,17}[$alpha])?"; | |
return (bool) preg_match("(^$localPart@(?:$domain\\.)+$topDomain\\z)i", $value); | |
} |
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
$('html, body').animate | |
scrollTop: $("#element").offset().top | |
, 2000 |
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
# Original post: http://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily | |
class @Scrolling | |
@keys | |
constructor: -> | |
Scrolling::keys = [37, 38, 39, 40] | |
preventDefault: (e) -> | |
e = e || window.event; |
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
<iPhone> | |
<Entitlements> | |
<![CDATA[ | |
<key>get-task-allow</key> | |
<false/> | |
<key>beta-reports-active</key> | |
<true/> | |
]]> | |
</Entitlements> | |
... |
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
$.nette.ext 'svg-spinner', | |
start: (c, s) -> | |
if s.nette.el | |
for i in s.nette.el | |
$(i).closest('*[id^=snippet--]').addClass 'svgSpinner' | |
# source: http://codepen.io/aurer/pen/jEGbA?editors=110 | |
$(i).closest('*[id^=snippet--]').append '<div class="snippet-wrapper"><div class="loader"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"width="24px" height="30px" viewBox="0 0 24 30" style="enable-background:new 0 0 50 50;" xml:space="preserve"> <rect x="0" y="13" width="4" height="5" fill="#333"> <animate attributeName="height" attributeType="XML"values="5;21;5"begin="0s" dur="0.6s" repeatCount="indefinite" /> <animate attributeName="y" attributeType="XML"values="13; 5; 13"begin="0s" dur="0.6s" repeatCount="indefinite" /> </rect> <rect x="10" y="13" width="4" height="5" fill="#333"> <animate attributeName="height" attributeType="XML"values="5;21;5"begin="0.15s" dur="0.6s" repeatCount="indefinite" /> <animate attributeName="y" |
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 | |
$appName = 'FILENAME'; | |
$adt = '/Applications/AIRSDK_Compiler/18/bin/adt'; | |
$target = 'ipa-app-store'; | |
$connect = ''; | |
$descriptor = 'application-testflight.xml'; | |
$cert = './cert/iOS/CERT.p12'; | |
$content = 'bin'; | |
$lib = './lib'; |
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 | |
# Install | |
# sudo chown -R :apache ./* | |
# sudo chmod 0775 -R ./* | |
# sudo -u apache git pull # Optional | |
# sed -i 's/filemode\ =\ true/filemode\ =\ false/g' .git/config | |
if (!isset($_GET['token']) || $_GET['token'] != md5('*****')) { | |
exit('Wrong token. Terminating.'); | |
} |
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 | |
/* | |
This is an update of https://wordpress.org/plugins/tumblr-importer/ that fixes several issues: | |
- do not skip posts without title/content | |
- when importing 1 image import it as a WP type image instead of gallery | |
- when importing images, import first image as a post's featured image | |
Plugin Name: Tumblr Importer | |
Plugin URI: http://wordpress.org/extend/plugins/tumblr-importer/ |
OlderNewer