Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
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 | |
# usage: drupal-quick-dump user host database | |
USER="$1" | |
HOST="$2" | |
DB="$3" | |
DATE=`date +%Y%m%d` | |
# Get User Password | |
echo "Please provide the password for ${USER} on db ${DB} hosted at ${HOST}:" |
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 | |
# For OSX. Assumes you have drush, git, mysql, apache, and Chrome installed. | |
# Usage: ./setup-drupal.sh cool-app 7 | |
SITE=$1 | |
VERSION=$2 | |
DIR="~/Development/sites/$SITE" |
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 | |
# Idea and interface taken from https://github.com/macmade/host-manager | |
path="/etc/hosts" | |
addusage="Usage: `basename $0` -add host address" | |
remusage="Usage: `basename $0` -remove host" | |
case "$1" in | |
-add) | |
if [ $# -eq 3 ]; then | |
if [[ -n $(grep "^$3.*[^A-Za-z0-9\.]$2$" ${path}) ]]; then |
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
app.filter "truncateText", -> | |
(string, maxLength, wordsafe = false, addEllipsis = false, minWordsafeLength = 1) -> | |
ellipsis = '' | |
maxLength = Math.max(maxLength, 0) | |
minWordsafeLength = Math.max(minWordsafeLength, 0) | |
# Remove HTML tags | |
string = string.replace(/<(?:.|\n)*?>/gm, '') | |
# No truncation needed, so don't add ellipsis, just return. |
OlderNewer