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> | |
#Options +FollowSymLinks +ExecCGI | |
RewriteEngine On | |
#RewriteBase / | |
#RewriteBase /PHP/nfm-matenight-lottery/ | |
# This makes serves up the public asset if it exists | |
RewriteCond public/$1 -F | |
RewriteRule ^(.*)$ public/$1 [QSA,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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
$>identify -format "%wx%h - %f\n" *.jpg |
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
.overflowed > p{ | |
width: 10em; | |
height: 5rem; | |
white-space: pre-line; | |
overflow: hidden; | |
outline: 1px dashed lime; | |
} | |
.overflowed-clip { | |
text-overflow: clip; |
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
<label for="toggle-1">I'm a toggle</label> | |
<input type="checkbox" id="toggle-1"> | |
<div>I'm controlled by toggle. No JavaScript!</div> |
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 aContainsB (a, b) { | |
return a.indexOf(b) >= 0; | |
} | |
var philosophers = "Aquinas, Maimonedes, and Avicenna"; | |
var me = "Joshua"; | |
function printPhilosopherStatus (person) { | |
if (aContainsB(philosophers, person)) { | |
console.log(person + " is a philosopher."); |
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 charset="utf-8"> | |
<title>Classical Pattern - Code Reuse Pattern</title> | |
<meta name="description" content="A framework for easily creating beautiful presentations using HTML"> | |
<meta name="author" content="Hakim El Hattab"> |
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
// Custom event listening | |
$(document).on('historyslider:initvideo', function (event) { | |
var args: any = [].slice.call(arguments), | |
players = args.length > 1 ? args[1] : $(); | |
_this.initVideo(players); | |
}); |
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
onScroll(): () => void { | |
var last, timeout, threshold = 100; | |
return () => { | |
var now = Date.now(); | |
if (last && now < last + threshold) { | |
window.clearTimeout(timeout); | |
timeout = window.setTimeout(function () { | |
last = now; |
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 charset="utf-8"> | |
<title>Factory Pattern</title> | |
<meta name="description" content="A framework for easily creating beautiful presentations using HTML"> | |
<meta name="author" content="Hakim El Hattab"> |