I hereby claim:
- I am chasingmaxwell on github.
- I am peter4k (https://keybase.io/peter4k) on keybase.
- I have a public key ASALMLzieyX9HEH2rcYNDl8BfWTcCSpYPHRj7Cm-1k1a0wo
To claim this, I am signing this object:
| /** | |
| * If you're working on a project that doesn't have jQuery or is using an old | |
| * version, you can take advantage of the latest jQuery for debugging and | |
| * troubleshooting from he console! | |
| * | |
| * Enter the following code into the console following the instructions in the | |
| * comments. Once you're done, you should be able to use $l alongside | |
| * any version of jQuery that already exists. | |
| * | |
| * I put this together with help from these posts: |
| (function(){ | |
| // Determine if any ajax call is currently in progress. | |
| Drupal.ajaxInProgress = function() { | |
| for (var id in Drupal.ajax) { | |
| if (Drupal.ajax[id].ajaxing === true) { | |
| return true; | |
| } | |
| } | |
| return false; |
| <?php | |
| /** | |
| * @file | |
| * Test file for phpcs. | |
| */ | |
| ?> | |
| <?php if (!empty($actions)): ?> |
| (function() { | |
| 'use strict'; | |
| var body = document.getElementsByTagName('body')[0].innerHTML, | |
| map = [ | |
| [/\bwitnesses\b/g, "these dudes I know"], | |
| [/\bWitnesses\b/g, "These dudes I know"], | |
| [/\ballegedly\b/g, "kinda probably"], | |
| [/\bAllegedly\b/g, "Kinda probably"], | |
| [/\bnew study\b/g, "tumblr post"], |
| <?php | |
| /** | |
| * HEADS UP! ---> turns out there is a better way to solve this problem. | |
| * Use ^ and $ to signify the beginning and end in your regex pattern and | |
| * then use preg_match(). It will get you the same result and faster! :) | |
| */ | |
| /** | |
| * Check that a string matches a pattern in PHP (similar to the html5 pattern |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/sh | |
| # Run the vagrant command for a particular project from anywhere. | |
| # | |
| # To use: | |
| # 1. Put this file in ~/bin/ or some other executable path (also make sure the | |
| # file is executable). | |
| # 2. Insert the path to the directory containing your project's Vagrantfile | |
| # where indicated below. | |
| # 3. Rename this file to match the project you're using it for. |
| <?php | |
| /** | |
| * This goes in YOUR_MODULE.module file. | |
| */ | |
| function YOUR_MODULE_form_alter(&$form, &$form_state, $form_id) { | |
| // Always add the html5 required attribute for required elements. | |
| _YOUR_MODULE_html5_required($form); | |
| } |
I hereby claim:
To claim this, I am signing this object:
| const MIN = -1e3; | |
| const MAX = 1e3; | |
| const SIZE = 1e6; | |
| /** | |
| * Get a random number between min and max. | |
| * | |
| * @param min the minimum integer possible. | |
| * @param max the maximum integer possible. | |
| */ |