This file contains hidden or 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
| Uncaught TypeError: Cannot read property 'fields' of undefined | |
| $.fn.addressfield.apply | |
| (anonymous function) | |
| f.event.dispatch | |
| f.event.add.h.handle.i | |
| f.event.trigger | |
| (anonymous function) | |
| e.extend.each | |
| e.fn.e.each | |
| f.fn.extend.trigger |
This file contains hidden or 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
| /** | |
| * Safely track outbound links in Google Analytics using jQuery | |
| */ | |
| (function($) { | |
| "use strict"; | |
| // Wait till the dom has loaded | |
| $(document).ready(function(){ | |
| // Current page host | |
| var host = window.location.host; |
This file contains hidden or 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 | |
| # Retrieves past and present logs for a site in Acquia Enterprise | |
| # Put this in your /usr/local/bin folder and chmod it 0755 | |
| # Then you can search/view logs quickly from any terminal | |
| if [ "$1" = "" ] || [ "$2" = "" ] | |
| then | |
| echo "Retrieves past and present logs for a site in Acquia Enterprise" | |
| echo "Usage: $0 <site-alias> <site-environment>" | |
| echo "Example: $0 qrk test" |
This file contains hidden or 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
| /** | |
| * Linkedin auto-connect thingy. | |
| * | |
| * Step 1) Log in to Linkedin and go to https://www.linkedin.com/people/pymk | |
| * (This is the "People You May Know page") | |
| * Step 2) Open your browser console and run this javascript. | |
| */ | |
| (function($) { | |
| var processedCards = []; | |
| var lih = function(){ |
This file contains hidden or 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 | |
| # Installs: | |
| # Iterm2 | |
| # Powerline fonts (for Menlo) | |
| # Material Design (color scheme) | |
| # Fish | |
| # Oh-my-fish | |
| # Agnoster theme (works well with Material) |
This file contains hidden or 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 | |
| cf_user=<inset your email address here> | |
| cf_token=<inset your api token here> | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| NC='\033[0m' | |
| if [ -z $1 ] |
This file contains hidden or 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 | |
| # Prevent cron tasks from being ran by multiple instances in Elastic Beanstalk. | |
| # Automatically adjusts to new "leading instance" when scaling up or down. | |
| # Stores the result in an environment variable for other uses as AWS_EB_CRON | |
| # | |
| # This must be ran by cron as the root user to function correctly. | |
| # Anything after this file will be executed as webapp for security. | |
| # | |
| # Example Cron (should be created by .ebextensions): |
This file contains hidden or 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 | |
| # Upgrade an Amazon Linux EC2 to PHP 7.3 | |
| # | |
| # Last tested w/ PHP 7.2 AWS Linux version 2.8.5 | |
| # | |
| # Must be ran as sudo: | |
| # sudo bash upgrade-php7.sh | |
| # | |
| # Can be added to ./.ebextensions/20_php.config like so: | |
| # container_commands: |
This file contains hidden or 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 | |
| /** | |
| * Automatically extrapolate JSON keys/values from a CSV into their own columns. | |
| * JSON is flattened, and null values/keys are ignored. | |
| * | |
| * Usage: | |
| * | |
| * php UnpackCSVJSON.php original.csv destination.csv | |
| */ | |
| $file = $argv[1]; |
This file contains hidden or 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
| DROP TABLE IF EXISTS jobs_copy; | |
| CREATE TABLE `jobs_copy` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `queue` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `payload` text COLLATE utf8_unicode_ci NOT NULL, `attempts` tinyint(3) unsigned NOT NULL, `reserved` tinyint(3) unsigned NOT NULL, `reserved_at` int(10) unsigned DEFAULT NULL, `available_at` int(10) unsigned NOT NULL, `created_at` int(10) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=29972441 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | |
| INSERT INTO `jobs_copy` SELECT * FROM `jobs`; | |
| DELETE FROM jobs WHERE `reserved` != 1 AND `id` IN (SELECT `id` FROM jobs_copy ORDER BY `id` DESC); | |
| # Repeat ad nauseam: | |
| INSERT INTO `jobs` (SELECT * FROM `jobs_copy` ORDER BY `id` ASC LIMIT 500); DELETE FROM `jobs_copy` ORDER BY `id` ASC LIMIT 500; SELECT SLEEP(18); SELECT COUNT(*) FROM `jobs`; |