Skip to content

Instantly share code, notes, and snippets.

Andy Miller rhukster

Block or report user

Report or block rhukster

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View htaccess_tester.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Grav .htaccess Tester</title>
<link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre.min.css">
<style>
body { padding: 2rem; }
textarea.form-input { height: 500px; }
@rhukster
rhukster / better-discord.css
Created Nov 22, 2018
Custom discord stylesheet with tighter spacing and better contrast
View better-discord.css
[class*="membersGroup-"] {
height: 28px;
padding-top: 8px;
padding-left: 12px;
}
[class*="member-"] {
height: 40px;
}
[class*="member-"] [class*="avatarWrapper"] [class*="small-"] {
width: 25px;
@rhukster
rhukster / test-ldap-2.php
Created May 5, 2018 — forked from leftclickben/test-ldap-2.php
Open a connection to an LDAP server, query it for a given user, and check group membership for that user (test script)
View test-ldap-2.php
#!/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]
View xdebug
#!/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.2
app="$(basename "$0")"
command="$1"
View sphp.sh
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
brew_array=("5.5","5.6","7.0","7.1","7.2", "7.3")
php_array=("php@5.5" "php@5.6" "php@7.0" "php@7.1" "php@7.2" "php@7.3")
valet_support_php_version_array=("php@5.5" "php@5.6" "php@7.0" "php@7.1" "php@7.2" "php@7.3")
php_installed_array=()
php_version="php@$1"
View gist:6df3bdb106e2b06242b10ae549e5e021
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
@rhukster
rhukster / conditional.yaml
Last active Mar 19, 2017
Conditional Field in Use
View conditional.yaml
conditional_new_entries:
type: conditional
condition: "id ? 'false' : 'true'"
classes: overlay bottom
fields:
field-a:
label: New Field A
type: text
@rhukster
rhukster / watch.sh
Last active Jul 25, 2019
Watch script for wellington sassc wrapper
View watch.sh
#!/bin/sh
#
# Configuration
#
# sass source
SASS_SOURCE_PATH="scss"
# sass options
@rhukster
rhukster / sphp.sh
Last active Dec 24, 2016 — forked from w00fz/sphp.sh
PHP switcher
View sphp.sh
#!/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 Vagrant Landing Page
<!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 */
You can’t perform that action at this time.