View pagespeed.php
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
<?php | |
$url = 'URL GOES HERE'; | |
$key = 'KEY GOES HERE'; | |
// View https://developers.google.com/speed/docs/insights/v1/getting_started#before_starting to get a key | |
$data = json_decode(file_get_contents("https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url=$url&key=$key")); | |
$dat = $data->formattedResults->ruleResults; | |
foreach($dat as $d) { | |
$name = $d->localizedRuleName; |
View .zshrc
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
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
# Initialization code that may require console input (password prompts, [y/n] | |
# confirmations, etc.) must go above this block; everything else may go below. | |
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
fi | |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH |
View seed_derivatives.drush.inc
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
<?php | |
/** | |
* Implements hook_drush_command(). | |
*/ | |
function seed_derivatives_drush_command() { | |
$items = array(); | |
$items['seed_derivatives'] = array( | |
'description' => "Create image derivatives", |
View worker-purger.js
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
/* eslint-disable no-undef */ | |
const url = require('url'); | |
function generateSimpleResponse(httpCode, strMessage) { | |
return new Response(JSON.stringify({ result: strMessage }), { | |
status: httpCode, | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
}); |
View greentext.module
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
<?php | |
function greentext_filter_info() { | |
$filters['greentext'] = array( | |
'title' => t('Implying greentext'), | |
'description' => t('Allows you to alter any lines input starting with \'>\' to appear as greentext.'), | |
'process callback' => '_greentext_greentext', | |
'tips callback' => '_greentext_greentext_tips', | |
); | |
return $filters; |
View acquia.inc
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
<?php | |
/** | |
* @file | |
* Utilities for use in protecting an environment via basic auth or IP whitelist. | |
*/ | |
function ac_protect_this_site() { | |
global $conf; |
View drushrc.php
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
<?php | |
$options['shell-aliases']['offline'] = 'variable-set -y --always-set maintenance_mode 1'; | |
$options['shell-aliases']['online'] = 'variable-delete -y --exact maintenance_mode'; | |
$options['shell-aliases']['sync-dbs'] = '!drush sql-sync --structure-tables-key=common --no-cache {{#prod}} {{@target}}'; | |
$options['shell-aliases']['sync-files'] = '!drush rsync {{#prod}}:%files {{@target}}:%files'; | |
$options['structure-tables']['common'] = array('cache', 'cache_filter', 'cache_menu', 'cache_page', 'history', 'sessions', 'watchdog'); | |
$options['shell-aliases']['sync-fsdb'] = '!drush sql-sync {{#prod}} {{@target}} && drush rsync {{#prod}}:%files {{@target}}:%files'; |
View lastfm.pl
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 perl | |
use strict; | |
use warnings; | |
use HTTP::Request; | |
use LWP::UserAgent; | |
use JSON; | |
use utf8; | |
binmode(STDOUT, ":utf8"); |
View what_should_i_port.pl
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 perl | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
use Scalar::Util qw(looks_like_number); | |
our $VERSION = 1.337; |
View adammalone.aliases.drushrc.php
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
<?php | |
$adam = array( | |
'remote-host' => 'adammalone.net', | |
'root' => '/var/www/html/adammalone/docroot', | |
'uri' => 'adammalone.net', | |
'strict' => 0, | |
'path-aliases' => array( | |
'%dump-dir' => '/home/adammalone/.drush/dumps', | |
'%files' => 'sites/default/files', |
NewerOlder