View gist:befd2a439b10d53d1e3f
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
# Grav Specific | |
cache/* | |
!cache/.* | |
assets/* | |
!assets/.* | |
logs/* | |
!logs/.* | |
images/* | |
!images/.* |
View gist:bc448ff158df4bc56217
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 max_by($array, $fieldname = null) | |
{ | |
$field_array = array(); | |
foreach ($array as $i => $befree) { | |
$field_array[$i] = $array[$i][$fieldname]; | |
} | |
return max($field_array); | |
} |
View Vagrant Landing Page
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Vagrant Grav</title> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> | |
<style> | |
/* Space out content a bit */ |
View sphp.sh
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
#!/bin/bash | |
# Check if command was ran as root. | |
if [[ $(id -u) -eq 0 ]]; then | |
echo "The command \"sphp\" should not be executed as root or via sudo directly." | |
echo "When a service requires root access, you will be prompted for a password as needed." | |
exit 1 | |
fi | |
# Usage |
View watch.sh
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
#!/bin/sh | |
# | |
# Configuration | |
# | |
# sass source | |
SASS_SOURCE_PATH="scss" | |
# sass options |
View conditional.yaml
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
conditional_new_entries: | |
type: conditional | |
condition: "id ? 'false' : 'true'" | |
classes: overlay bottom | |
fields: | |
field-a: | |
label: New Field A | |
type: text |
View gist:6df3bdb106e2b06242b10ae549e5e021
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
route: | |
type: parents | |
show_root: true | |
show_all: true | |
show_fullpath: false | |
show_slug: true | |
start_route: '/test' | |
limit_levels: 3 | |
label: PLUGIN_ADMIN.PARENT | |
classes: fancy |
View sphp.sh
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
#!/bin/bash | |
# Creator: Phil Cook | |
# Modified: Andy Miller | |
# | |
# >>> IMPORTANT: Moved to: https://github.com/rhukster/sphp.sh | |
# >>> Kept here for legacy purposes | |
# | |
osx_major_version=$(sw_vers -productVersion | cut -d. -f1) | |
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2) | |
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3) |
View xdebug
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 | |
# http://github.com/w00fz/xdebug-osx | |
# | |
# @author Djamil Legato http://github.com/w00fz/xdebug-osx | |
# @modified Andy Miller - Homebrew/core compatibility | |
# @license MIT | |
# @version 1.3 | |
app="$(basename "$0")" | |
command="$1" |
View test-ldap-2.php
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/php | |
<?php | |
# Parse options | |
$opts = getopt('h:n:u:p:b:s:', array( 'help' )); | |
if (isset($opts['help']) && $opts['help']) { | |
echo <<<ENDHELP | |
Usage: | |
$argv[0] [-h HOSTNAME] [-n PORTNUM] [-u USERNAME] [-p PASSWORD] [-b BASEDN] [-s SEARCH] |
OlderNewer