View gist:078ec6f3508ffef0afb478127adf5046
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 App\Http\Requests; | |
use Illuminate\Foundation\Http\FormRequest; | |
class ValidateEntryRequest extends FormRequest | |
{ | |
/** | |
* Determine if the user is authorized to make this request. |
View gist:3d0e9b743f0ba6437c1b17148628da56
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
{"listInfo":{"startingIndex":0,"size":1,"available":1},"emails":[{"id":666,"subject":"dmharris 20181012 test","openCount":0,"recipientCount":4,"clickCount":0,"deliveryDate":"20181012134511"}]} | |
{"listInfo":{"startingIndex":0,"size":21,"available":21},"emails":[{"id":1,"subject":"test email number 1","openCount":9,"recipientCount":100,"clickCount":3,"deliveryDate":"20180101124500"},{"id":2,"subject":"test email number 2","openCount":20,"recipientCount":100,"clickCount":13,"deliveryDate":"20180201144500"},{"id":3,"subject":"test email number 3","openCount":47,"recipientCount":100,"clickCount":20,"deliveryDate":"20180301144500"},{"id":4,"subject":"test email number 4","openCount":39,"recipientCount":100,"clickCount":10,"deliveryDate":"20180401144500"},{"id":5,"subject":"test email number 5","openCount":34,"recipientCount":100,"clickCount":7,"deliveryDate":"20180501144500"},{"id":6,"subject":"Email 6 dear staffers this is a really long subject that is annoying","openCount":34,"recipientCount":100,"clickCount":2 |
View gist:306ed82964ee1f6e9d0dbfa324ccf340
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
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; | |
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; | |
import { | |
createDropdown, | |
addToolbarToDropdown | |
} from '@ckeditor/ckeditor5-ui/src/dropdown/utils'; | |
export default class MergeFields extends Plugin { | |
static get pluginName() { | |
return 'mergeFields'; | |
} |
View Run docker container with Sentry
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 | |
echo | |
echo '-- STOP --' | |
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) | |
echo | |
echo '-- START --' |
View gist:e8f56ce747e2ddc5647de752a34b9d0e
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
if ( ! function_exists('lead_image')) { | |
/** | |
* * Display the post image | |
*/ | |
function lead_image() | |
{ | |
$categories = get_the_terms(get_the_ID(), 'category'); | |
$dataCategory = []; | |
if ( ! empty($categories)) { | |
foreach ($categories as $category) { |
View gist:d8609ee81cd50908badbfbcb8a61fce2
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
$customFields = json_decode($value, true); | |
if ( ! empty($customFields)) { | |
$attributes = []; | |
foreach ($customFields as $custom_field) { | |
$customFieldData = explode('::::', $custom_field); | |
$attributes[head($customFieldData)] = end($customFieldData); | |
} | |
return $this->attributes['custom_fields'] = json_encode($attributes); |
View gist:10d03e65f757b0347af3b805f6c2d1cc
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
foreach ($this->teams($user) as $team) { | |
$permissions[$team->id] = array_dot(app(RoleRepository::class)->permissions($user->roleOn($team))); | |
} | |
Vue.directive('permission', function (el, binding) { | |
let idPermission = binding.value.split('_'); | |
let team = idPermission[0]; | |
let permission = idPermission[1]; |
View ad.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
//Sample JavaScript implementation | |
var w = window, | |
sf = w.$sf, | |
sfAPI = sf && sf.ext, | |
myPubCookieValue = "", | |
settingCookie = false; | |
//Register the status update listener | |
function register_content() { |
View ad.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
<div id="container"> | |
<style type="text/css"> | |
body, html { | |
margin:0; | |
padding:0; | |
} | |
</style> | |
<script> |
View ad.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
var w = window, | |
sf = w["$sf"], | |
sfAPI = sf && sf.ext, | |
// Set cookie name | |
myPubCookieName = "foo", | |
myPubCookieValue = "washingtonian-dropdown-ad-viewed", | |
fetchingCookie = false; // Flag | |
function register_content() { |
NewerOlder