This file contains hidden or 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
@font-face { | |
font-family: 'Roboto Slab'; | |
src: url("/fonts/googlefonts/RobotoSlab-Bold.ttf"); | |
font-weight: 700; | |
} | |
@font-face { | |
font-family: 'Roboto Slab'; | |
src: url("/fonts/googlefonts/RobotoSlab-Regular.ttf"); | |
font-weight: 400; | |
} |
This file contains hidden or 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
.video-wrapper { | |
position: relative; | |
width: 100%; | |
height: 0; | |
padding-bottom: 56.25%; | |
border-radius: 15px; | |
overflow: hidden; | |
} | |
/*class on iframe*/ |
This file contains hidden or 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
$body.on('input', '#cvv', function(){ | |
$('#cvv-fake').val(new Array(this.value.length + 1).join('*')); | |
}); | |
<div class="form-group relative"> | |
<label for="cvv" class="sr-only">CVV</label> | |
<input type="cvv" id="cvv-fake" class="form-control" name="cvv" | |
autocomplete="off" placeholder="CVV" title="Card CVV (XXX)" | |
maxlength="3" value="" tabindex="-1"/> | |
<input data-bind="value: cvv" type="cvv" id="cvv" class="form-control" name="cvv" |
This file contains hidden or 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
INSERT INTO sessions (user_id, token, expires, session_data) | |
VALUES (?, ?, FROM_UNIXTIME(?), ?) | |
ON DUPLICATE KEY UPDATE user_id=VALUES(user_id), expires=VALUES(expires), session_data=VALUES(session_data); |
This file contains hidden or 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
<input type="text" class="form-control input-lg verify-code-field" data-bind="value: verifyCode" | |
required pattern="\d{4}" oninvalid="setCustomValidity('Please type 4 digit code')" onchange="try{setCustomValidity('')}catch(e){}" | |
placeholder="Enter your 4 digit code to claim"/> |
This file contains hidden or 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
<input type="text" ng-model="user.phone" name="phone" ng-change="numberHelper()" ng-model-options="{allowInvalid:true}" ng-pattern="/^\+\d-\d{3}-\d{3}-\d{4}$/"/> | |
function numberHelper(){ | |
var phone = $scope.user.phone; | |
var formattedPhone = phone; | |
if(phone && !/^\+\d-\d{3}-\d{3}-\d{4}$/.test(phone)){ | |
phone = phone.replace(/[+-]/g, ''); | |
phone = '+' + phone.substr(0, 1) | |
+ (phone[1] ? '-' : '') + phone.substr(1, 3) | |
+ (phone[4] ? '-' : '') + phone.substr(4, 3) |
This file contains hidden or 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
$('[contenteditable]').on('paste',function(e) { | |
e.preventDefault(); | |
var text = (e.originalEvent || e).clipboardData.getData('text/html'); | |
var $result = $('<div></div>').append($(text)); | |
// remove unnecesary tags (if paste from word) | |
$result.children('style').remove(); | |
$result.children('meta').remove(); |
This file contains hidden or 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
.directive('earlyClick', function() { | |
return { | |
require: '?ngModel', | |
link: { | |
pre: function(scope, iElement, iAttrs, ctrl) | |
{ | |
ctrl = null; | |
if (ctrl) { | |
//First way: reset the state inside a parser | |
ctrl.$parsers.push(function(val) { |
This file contains hidden or 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 clone(object){ | |
var copy = JSON.stringify(object); | |
return JSON.parse(copy); | |
} |
This file contains hidden or 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 | |
public function getIp() | |
{ | |
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { | |
$proxies = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); | |
$proxies = array_reverse($proxies); | |
foreach ($proxies as $proxy) { | |
if ($this->isPrivateIp(trim($proxy))) { | |
return $this->isPrivateIp(trim($proxy)); |
NewerOlder