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 | |
sudo yum -y update | |
cd ~ | |
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm | |
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm | |
sudo yum install -y --skip-broken php56w php56w-opcache |
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
########################################## | |
# To run: | |
# curl -sSL https://gist.githubusercontent.com/fcjurado/ba266337014912bde974bed47219cd28/raw/87bb06a6aa72ff9783725ae8ce14c5f9508eaff5/install-docker-mint.sh | bash -x | |
########################################## | |
# Check that HTTPS transport is available to APT | |
if [ ! -e /usr/lib/apt/methods/https ]; then | |
sudo apt-get update | |
sudo apt-get install -y apt-transport-https | |
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
#!/bin/bash | |
if [ ! -d "./converted" ]; then mkdir "./converted"; fi | |
if [ ! -d "./tmp" ]; then mkdir "./tmp"; fi | |
for i in $(find ./ -name '*.mp4') | |
do | |
for word in $i | |
do | |
case "$word" in | |
*converted* ) |
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 | |
path=${1%/} | |
user=${2} | |
group=${3} | |
help="\nHelp: This script is used to fix permissions of a Drupal 7 installation\nwhere the PHP Handler is FastCGI\nyou need to provide the following arguments:\n\t 1) Path to your drupal installation\n\t 2) Username of the user that you want to give files/directories ownership\n\nNote: This script assumes that the group is the same as the username if your PHP is compiled to run as FastCGI. If this is different you need to modify it manually by editing this script or checking out forks on GitHub.\nUsage: bash ${0##*/} drupal_path user_name\n" | |
echo "Refer to https://www.Drupal.org/node/244924" |
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 | |
# http://gs.statcounter.com/screen-resolution-stats | |
# https://medium.com/@uiuxlab/the-most-used-responsive-breakpoints-in-2017-of-mine-9588e9bd3a8a | |
resolutions=("1920x1080" "1600x900" "1440x900" "1366x768" "1280x1024" "1280x800" "1080x1920" "1024x768" "768x1024" "750x1334" "720x1280" "640x960" "640x1136" "480x800" "360x640" "320x568" "320x534") | |
urls=("search/mario" "search/luigi" "search/koopa" ) | |
for r in "${resolutions[@]}" | |
do | |
for u in "${urls[@]}" | |
do |
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 | |
printf "Switching php to version 7.1 with symlinks.\n" | |
printf "Press any key to continue...\n" | |
read CONTINUE | |
printf "Creating backups..." | |
# Backup original binaries |
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 configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro | |
# | |
WP_OWNER=changeme # <-- wordpress owner | |
WP_GROUP=changeme # <-- wordpress group | |
WP_ROOT=/home/changeme # <-- wordpress root directory |
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
wp post delete $(wp post list --post_type='post' --format=ids) --force | |
wp post delete $(wp post list --post_type='attachment' --format=ids) --force; |
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
/* | |
* Implements hook_preprocess_HOOK(). | |
*/ | |
function rest_views_views_pre_render(&$view) { | |
if ($view->storage->id() == 'articles') { | |
$matchedGroupIds = array(); | |
foreach ($view->result as $row) { | |
$id = $row->_entity->id(); | |
if(!in_array($id, $matchedGroupIds)){ | |
array_push($matchedGroupIds, $id); |
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
var projectID = "xxxx-xxxx"; | |
// session-id can apparently be set to an arbitrary value, eg. "abcd1234-abcd-abcd-abcd-abcd12345678". | |
var sessionID = "xxxx-xxxx"; | |
var serviceAccountEmail = "xxxx-xxxxx@xxxxxxxx.iam.gserviceaccount.com"; | |
var serviceAccountPrivateKey = "-----BEGIN PRIVATE KEY-----\nXXXXXXX==\n-----END PRIVATE KEY-----\n"; | |
var ClaimSet = /** @class */ (function () { | |
function ClaimSet(scopes, issuerEmail) { | |
this.scopes = scopes; | |
this.issuerEmail = issuerEmail; |
OlderNewer