These components have zero dependencies. They all require PHP > 5.3.3, but they can be integrated into projects without pulling in surprise dependencies. Some of them might not be terribly useful without a good binding component (e.g., DomCrawler and CSSSelector work best when using BrowserKit).
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 | |
# autosvnsync.sh is a tool for automatically synchronizing/mirroring SVN repositories. | |
# By default, the script assumes that you have configured a "syncuser" account on the SRC and DEST servers, | |
# and that you are running the script as "syncuser" on the DEST server (presumably behind a firewall). | |
#Remote SVN info | |
SVN_HOST="[email protected]" #User and host, for SSH - alternatively, you can use ~/.ssh/config to specialize something | |
SVN_LOC="data/svn" | |
SVN_REPO="svn+ssh://$SVN_HOST/$SVN_LOC" |
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 | |
servers[0]=server0.example.com | |
servers[1]=server1.example.com | |
servers[2]=server2.example.com | |
TMP_CERT_QUIT=/tmp/check_cert_quit.tmp | |
TMP_CERT_CHECK=/tmp/check_cert.tmp | |
if [ -f "$TMP_CERT_CHECK" ] |
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 | |
if [ -z "$1" -o -z "$2" -o -z "$3" ] | |
then | |
echo "Usage: remote-diff.sh [user@]host1 [user@]host2 path_to_file" | |
echo "" | |
echo "Note: If you need to specify a valid key or optional username for the host," | |
echo " you are encouraged to add the host configuration to your ~/.ssh/config file." | |
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
s = { | |
id = "3E89CB4C-C61A-4F25-B40C-37824BF89EA4", | |
internalName = "Night.", | |
title = "Night.", | |
type = "Develop", | |
value = { | |
settings = { | |
AutoLateralCA = 0, | |
Blacks2012 = 0, | |
BlueHue = 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
... | |
<div> | |
{# Split the post into an array using explode(). | |
Because we provide a length of 2, the remainder | |
of the post will be stored in the second array | |
element, even if there are multiple breakpoints. #} | |
{% set break_array = | |
post.blocks.content|split('<!-- break -->', 2) %} | |
{# Output the first element of the array in raw mode #} |
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
# Updated to work on OS X (convert both "-E" flags to "-r" to run on real server OSes) | |
echo "$STRING" | iconv -t ascii//TRANSLIT | sed -E s/[^a-zA-Z0-9]+/-/g | sed -E s/^-+\|-+$//g | tr A-Z a-z |
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 | |
# Grab the certificate and parse out some info | |
# Usage: | |
# showcerts whateverthing.com | |
echo | openssl s_client -showcerts -connect "${1}:443" -servername "$1" | openssl x509 -text |
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
{# Based on this StackOverflow example: https://stackoverflow.com/a/26311354/1272059 #} | |
{% macro time_ago(timestamp) %} | |
{% set lapse = date().getTimestamp() - timestamp %} | |
{% set units = { | |
'year': 31536000, | |
'month': 2592000, | |
'week': 604800, | |
'day': 86400, | |
'hour': 3600, |
You'll need to have:
- PHP 7.2 installed and configured in your path (so you can run php just by typing "php").
- You'll probably need a few extensions enabled, like curl and openssl and maybe mbstring and a few others.
- Git installed and configured in your path (so composer can use it).
- Composer installed and (ideally) configured with a DOSKEY alias (so it's most useful for you! :) )
OlderNewer