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 is21YearsOld(date) { | |
var now = new Date(); | |
var date = new Date(date); | |
var old = new Date(now.getFullYear()-21, now.getMonth(), now.getDate()); | |
return date.getTime()<old.getTime(); | |
} |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Meta --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Css3 Fold Effect</title> | |
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
// Boolean Value | |
console.log('===== Boolean Value!'); | |
console.log( ( 1 ) ? 'true' : 'false' ); // true | |
console.log( ( '0' ) ? 'true' : 'false' ); // true | |
console.log( ( '1' ) ? 'true' : 'false' ); // true | |
console.log( ( [] ) ? 'true' : 'false' ); // true | |
console.log( ( {} ) ? 'true' : 'false' ); // true | |
console.log( ( '' ) ? 'true' : 'false' ); // false | |
console.log( ( 0 ) ? 'true' : 'false' ); // false | |
console.log( ( NaN ) ? 'true' : 'false' ); // false |
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_rewrite.c> | |
Header add Access-Control-Allow-Origin "*" | |
Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT" | |
Header add Access-Control-Allow-Headers: "Content-Type" | |
RewriteEngine on | |
RewriteBase / | |
</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
web: python manage.py runserver 0.0.0.0:$PORT --noreload |
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 | |
//Get data from instagram api | |
$hashtag = 'max'; | |
//Query need client_id or access_token | |
$query = array( | |
'client_id' => '', | |
'count' => 3 | |
); | |
$url = 'https://api.instagram.com/v1/tags/'.$hashtag.'/media/recent?'.http_build_query($query); |
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(){ | |
$('input[name="number"]').bind('keypress', function(e){ | |
var keyCode = (e.which)?e.which:event.keyCode | |
return !(keyCode>31 && (keyCode<48 || keyCode>57)); | |
}); | |
}); |
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
.loading-container { | |
position:absolute; | |
top:0; | |
right:0; | |
bottom:0; | |
left:0; | |
display:none; | |
} | |
.loading-container:before { | |
position:absolute; |
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
javascript:(function(){ | |
var url = location.href; | |
var title = `${document.getElementById('key-val').innerText} ${document.getElementById('summary-val').innerText}`; | |
var description = document.getElementById('description-val').innerText; | |
body = ` | |
### Description | |
[Jira](${location.href}) | |
${description} |
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
scp example.txt username@server:/path/to/upload/ |
NewerOlder