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 | |
# | |
# Cloud Hooks: code-deploy, code-update, db-copy, web-activate | |
# Essentially any time code or db changes are made. | |
# | |
# Purges Varnish cache for all .com domains assigned to the environment in Acquia Cloud. | |
site="$1" | |
target_env="$2" | |
drush_alias=$site'.'$target_env |
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 | |
# Runs an acquia task, and waits for the task to complete before continuing. | |
# This is a helper script, to be used in others as needed. | |
if [[ $1 = "" ]] || [[ $2 = "" ]] | |
then | |
echo "Runs an acquia drush command, waiting for the results before continuing." | |
echo "Can be used as a replacement for drush." | |
echo | |
echo " Usage: $0 <site-alias> <ac-drush-command>" |
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 class="container" style="width: 750px; margin: 0 auto;"> | |
<div class="row-full"> | |
--- Full width container --- | |
</div> | |
</div> |
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 | |
die () { | |
echo -e "\033[0;31m$*\033[m" >&2 | |
exit 1 | |
} | |
DIR=${1:-.} | |
if [ ! -d "$DIR" ]; 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
#!/bin/bash | |
#This script creates a diffed latex document comparing your recent uncommitted changes to your git last commit. | |
# | |
# ./gitLatexDiff.sh "folder path containing the git repository" | |
# | |
#You need to make sure that the current version at least compiles. | |
# | |
#The file and folder structure: | |
# |
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 python3 | |
import datetime | |
import random | |
import subprocess | |
import sys | |
import time | |
import threading | |
import keylogger | |
WASD = ['w', 'a', 's', 'd'] | |
def random_time(minimum=30, maximum=60): |
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
brew install rename | |
# Rename all filenames from old_name to new_name | |
rename 's/old_name/new_name/g;' * | |
# Rename all instances of old_name with new_name inside the files in current directory | |
perl -pi -w -e 's/old_name/new_name/g;' * | |
# Just to be safe search for the old_name | |
ag old_name |
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 | |
# Acquia | |
CLOUDAPI_ID='id' | |
CLOUDAPI_KEY='key' | |
DOCROOT="docroot" | |
CREDS="${CLOUDAPI_ID}:${CLOUDAPI_KEY}" | |
ssh-keygen -q -b 4096 -t rsa -N "" -f ./script.key |
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
Source: https://www.bluespark.com/blog/uninstalling-and-purging-field-modules-all-once | |
The job is divided in three parts: The data definition, field data purge and module list clean. | |
In the data definition task we provide all the required data we need to perform the task, the name of the field to delete, and given that | |
information, we get the field_info array and the name of the module to be uninstalled. Finally, field_delete_field() is executed. | |
After that the field data is purged in the batch body, and since we don't know how much data we will have to purge, we remove just 100 | |
database rows per batch execution. After each purge we check if all the data has been removed to decide if we have to remove more data | |
from the database or continue to the final part. |
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> | |
<html<?php print $html_attributes; ?>> | |
<head> | |
<?php print $head; ?> | |
<title><?php print $head_title; ?></title> | |
<?php print $styles; ?> | |
<?php print $head_scripts; ?> | |
</head> | |
<body<?php print $body_attributes;?>> |