A nice looking calendar with nice transistions.
A Pen by Paul Navasard on CodePen.
// follow modules loaded via `npm i --save request cheerio` | |
const request = require('request'); | |
const cheerio = require('cheerio'); | |
const http = require('http'); | |
http.createServer((req, res) => { | |
getDueTimes().then(data => { | |
res.writeHead(200, { 'content-type': 'application/json' }); | |
res.end(JSON.stringify(data)); | |
}).catch(error => { |
A nice looking calendar with nice transistions.
A Pen by Paul Navasard on CodePen.
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test with ES6 and JSX</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.css"> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
</head> | |
<body> | |
<div id="app"></div> |
#calendar { | |
margin-top:5em; | |
width: 100%; | |
} | |
#month { | |
text-align:center; | |
text-transform:uppercase; | |
} |
<div class="row"> | |
<div class="large-12 columns calendar-container"> | |
<h3 class="month"> | |
<a href="/admin/analytics?class=cal-larr&date=2013-11-01"><</a> | |
December 2013 | |
<a href="/admin/analytics?class=cal-rarr&date=2014-01-01">></a> | |
</h3> | |
<section class="calendar" role="main"> | |
<ul class="day-row"> | |
<li class="day">SUN</li> |
javascript:function loadScript(u) { | |
var s = document.createElement('script'); | |
s.setAttribute('src', u); | |
s.onreadystatechange= function () { | |
bmhelper(); | |
}; | |
s.onload = bmhelper; | |
document.getElementsByTagName('body')[0].appendChild(s);} | |
loadScript('http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'); | |
function bmhelper(){ |
<?php include 'protect.php';?> | |
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body>Secrets. </body> | |
</html> |
#in .htaccess file in the folder you're trying to protect | |
AuthType Basic | |
AuthName "This Area is Password Protected" | |
AuthUserFile /full/path/to/.htpasswd | |
Require valid-user | |
#put in a .htpasswd file in a non-public facing directory | |
#you can generate a password here: http://www.htaccesstools.com/htpasswd-generator/ | |
darrylsnow:$apr1$O/BJv...$vIHV9Q7ySPkw6Mv6Kd/ZE/ |
<?php | |
// Define your username and password | |
$username = "USERNAME HERE"; | |
$password = "PASSWORD HERE"; | |
if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) { | |
?> | |
<h1>Login</h1> | |
You must login to see this private content.<br> | |
<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> | |
<p><label for="txtUsername">Username:</label> |
/* ... Bookmark this page ... */ | |
var $pageFav = $('.page-favor'), // li.page-favor | |
$pageFavLink = $pageFav.find('a'); | |
if ( window.sidebar || 'AddFavorite' in window.external || window.opera ) { | |
$pageFav.show(); | |
} | |
/* Source: http://calisza.wordpress.com/2008/11/03/javascript-jquery-bookmark-script/ */ | |
// add a 'rel' attrib if Op 7+ && Fx >= 23 | |
if ( window.opera || window.sidebar ) { |