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
#!/usr/bin/env bash | |
set -u | |
set -e | |
set -o pipefail | |
if [ $# -ne 1 ]; then | |
echo "Usage: sphp [phpversion]" | |
exit 1 | |
fi |
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
version: '2' | |
services: | |
nginx: | |
build: | |
context: ./ | |
dockerfile: ./resources/nginx/nginx.dockerfile | |
volumes: | |
- ./:/var/www/html | |
- ./resources/nginx/default.conf:/etc/nginx/conf.d/default.conf |
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 | |
/** | |
* The MIT License (MIT) | |
* Copyright (c) 2016 Alegion (http://www.alegion.com) | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to | |
* deal in the Software without restriction, including without limitation the | |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
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
<h1>Super Awesome Session-Based Rate Limiter</h1> | |
<?php | |
session_start(); | |
$blocked = false; | |
$message = "You may pass."; | |
$now = new \DateTime(); | |
$attempts = isset($_SESSION['attempts']) ? $_SESSION['attempts'] : []; |
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
// Top 10 self diagnoses WITHOUT a corresponding professional diagnosis | |
MATCH (selfDiagnosis:Disorder)<-[:SELF_DIAGNOSIS]-(p:Person) | |
WHERE NOT (p)-[:PROFESSIONAL_DIAGNOSIS]->() | |
RETURN selfDiagnosis.name, COUNT(p) AS diagnoses | |
ORDER BY diagnoses DESC | |
LIMIT 10; | |
// Top 10 Diagnoses: Self-diagnoses vs MD-diagnoses | |
MATCH (d:Disorder)<-[sd:SELF_DIAGNOSIS]-() | |
WITH d, COUNT(sd) AS selfDiagnoses |
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
# ... snip ... | |
2016-06-16 14:03:13.208+0000 INFO [o.n.k.i.DiagnosticsManager] JIT compiler: HotSpot 64-Bit Tiered Compilers | |
2016-06-16 14:03:13.208+0000 INFO [o.n.k.i.DiagnosticsManager] VM Arguments: [-XX:+UseG1GC, -XX:-OmitStackTraceInFastThrow, -XX:hashCode=5, -XX:+AlwaysPreTouch, -XX:+UnlockExperimentalVMOptions, -XX:+TrustFinalNonStaticFields, -XX:+DisableExplicitGC, -Dunsupported.dbms.udc.source=tarball, -Dfile.encoding=UTF-8] | |
2016-06-16 14:03:13.209+0000 INFO [o.n.k.i.DiagnosticsManager] Java classpath: | |
2016-06-16 14:03:13.212+0000 INFO [o.n.k.i.DiagnosticsManager] [bootstrap] /usr/lib/jvm/jdk1.8.0_45/jre/lib/jsse.jar | |
2016-06-16 14:03:13.213+0000 INFO [o.n.k.i.DiagnosticsManager] [classpath + loader.0] file:/opt/neo4j-enterprise-3.0.2/lib/neo4j-management-3.0.2.jar | |
2016-06-16 14:03:13.213+0000 INFO [o.n.k.i.DiagnosticsManager] [classpath + loader.0] file:/opt/neo4j-enterprise-3.0.2/lib/neo4j-unsafe-3.0.2.jar | |
2016-06-16 14:03:13.213+0000 INFO [o.n.k.i.DiagnosticsManager] [classpath + loader.0 |
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
Verifying that "jeremykendall.id" is my Blockstack ID. https://onename.com/jeremykendall |
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
<template> | |
<div> | |
<div class="row"> | |
<div class="col-md-12"> | |
<div class="filter fdiv" id="filter"> | |
<button type="button" v-on:click="toggleSelectAll" class="btn btn-primary"> | |
<span v-if="selectAllActive"><i class="fa fa-check-square"></i> <span class="micit-button-label">Deselect</span> all</span> | |
<span v-else><i class="fa fa-square"></i> <span class="micit-button-label">Select</span> all</span> | |
</button> | |
<div class="btn-group" role="group"> |
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 goes in app root | |
$_SERVER['SCRIPT_NAME'] = 'index.php'; | |
include 'public/index.php'; |
NewerOlder