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 queryParams = window.location.search.substr(1).split('&').reduce(function (q, query) { | |
var chunks = query.split('='); | |
var key = chunks[0]; | |
var value = chunks[1]; | |
return (q[key] = value, q); | |
}, {}); |
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 | |
/** | |
* Verbose Beautified Date Range | |
* | |
* @access public | |
* @param mixed $start_date | |
* @param mixed $end_date | |
* @return $date_range (beautified date range) | |
* @license WTFPL | |
* |
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 | |
namespace Drupal\wt_base; | |
use Symfony\Component\HttpFoundation\RequestStack; | |
use Drupal\Core\PathProcessor\OutboundPathProcessorInterface; | |
use Symfony\Component\HttpFoundation\Request; | |
use Drupal\Core\Render\BubbleableMetadata; | |
/** | |
* Class DefaultService. |
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 | |
// Namespace | |
namespace App\Validators; | |
// Using directives | |
use Cache; | |
use Carbon\Carbon; | |
// Domain black list validation class |
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/ruby | |
# A script to automate changelog generation from Git commit messages | |
# | |
# For use with a git-flow workflow, it will take changes from the last tagged release | |
# where commit messages contain NEW, FIXED, and IMPROVED keywords and sort and fromat | |
# them into a Markdown release note list. | |
# | |
# The script takes version information from the macOS command agvtool and bases | |
# the product name on the first matching Xcode Info.plist found |
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 | |
# | |
# a simple way to parse shell script arguments | |
# | |
# please edit and use to your hearts content | |
# | |
ENVIRONMENT="dev" |
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 of hook_drush_command(). | |
*/ | |
function migration_filepath_drush_command() { | |
$items = array(); | |
$items['migration_filepath'] = array( | |
'description' => "Move files to subdirectories", | |
'callback' => 'drush_migration_filepath', |
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 | |
# Check if command was ran as root. | |
if [[ $(id -u) -eq 0 ]]; then | |
echo "The command \"sphp\" should not be executed as root or via sudo directly." | |
echo "When a service requires root access, you will be prompted for a password as needed." | |
exit 1 | |
fi | |
# Usage |
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
<style> | |
.bg-video { | |
position: fixed; | |
top: 0; | |
left: 0; | |
width: 100vw; | |
height: 100vh; | |
overflow: hidden; | |
z-index: -1; | |
} |
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 | |
class DrupalHubFlagLike extends \RestfulEntityBase { | |
/** | |
* {@inheritdoc} | |
*/ | |
public function publicFieldsInfo() { | |
$public_fields = parent::publicFieldsInfo(); |
NewerOlder