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 Union\Events\OnSaveEntry; | |
use Craft\EntryModel; | |
use Craft\ElementType; | |
use function Craft\craft; | |
class PhotoAlbumsListener | |
{ | |
protected $entry; |
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
.MyModule | |
// attributes (alphabetical) | |
background: blue; | |
// pseudo | |
&:before { | |
} |
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 | |
$img = \imagecreatefromjpeg('someimage.jpg'); | |
for ($y = 0; $y < imagesy($img); $y++) { | |
for ($x = 0; $x < imagesx($img); $x++) { | |
// find color index at x,y | |
$pixelColorIndex = imagecolorat($img, $x, $y); | |
$pixelColorRGB = imagecolorsforindex($img, $pixelColorIndex); | |
// set new color if test color matches | |
if ($pixelColorRGB['red'] == 255 && $pixelColorRGB['green'] == 255 && $pixelColorRGB['blue'] == 255) { |
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 | |
$tokenUrl = 'https://graph.facebook.com/oauth/access_token?client_id={client_id}&client_secret={client_secret}&grant_type=client_credentials'; | |
$token = file_get_contents($tokenUrl); | |
$postsUrl = 'https://graph.facebook.com/{page_id or slug}/posts?' . $token; | |
$postsJson = file_get_contents($postsUrl); | |
$posts = json_decode($postsJson); |
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 | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then | |
exit 0 |
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
$('[name="playa[channels][]"] option').each(function() { | |
var optionText = $(this).text().toLowerCase(); | |
if(optionText.indexOf("team") !== -1 || optionText.indexOf("people") !== -1) { | |
$(this).attr('selected', 'selected'); | |
} | |
}); |
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
OFXHEADER:100 | |
DATA:OFXSGML | |
VERSION:102 | |
SECURITY:NONE | |
ENCODING:USASCII | |
CHARSET:1252 | |
COMPRESSION:NONE | |
OLDFILEUID:NONE | |
NEWFILEUID:NONE |
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
$.Redactor.prototype.strikethrough = function() | |
{ | |
return { | |
init: function() { | |
var button = this.button.add('strikethrough', 'Strikethrough'); | |
this.button.setAwesome('strikethrough', 'fa-strikethrough'); | |
this.button.addCallback(button, this.strikethrough.show); |
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
Illuminate\Events\EventServiceProvider: 81.346 - ( 0.000 ) | |
Illuminate\Routing\RoutingServiceProvider: 81.376 - ( 0.000 ) | |
Illuminate\Auth\AuthServiceProvider: 81.391 - ( 0.000 ) | |
Illuminate\Routing\ControllerServiceProvider: 81.405 - ( 0.000 ) | |
Illuminate\Cookie\CookieServiceProvider: 81.419 - ( 0.000 ) | |
Illuminate\Database\DatabaseServiceProvider: 84.428 - ( 0.003 ) | |
Illuminate\Encryption\EncryptionServiceProvider: 84.452 - ( 0.000 ) | |
Illuminate\Filesystem\FilesystemServiceProvider: 84.467 - ( 0.000 ) | |
Illuminate\Foundation\Providers\FormRequestServiceProvider: 84.554 - ( 0.000 ) | |
Illuminate\Foundation\Providers\FoundationServiceProvider: 84.571 - ( 0.000 ) |
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
Illuminate\Events\EventServiceProvider: 0.088587045669556 | |
Illuminate\Routing\RoutingServiceProvider: 0.088603973388672 | |
Illuminate\Auth\AuthServiceProvider: 0.088613033294678 | |
Illuminate\Routing\ControllerServiceProvider: 0.088622093200684 | |
Illuminate\Cookie\CookieServiceProvider: 0.088631153106689 | |
Illuminate\Database\DatabaseServiceProvider: 0.092144966125488 | |
Illuminate\Encryption\EncryptionServiceProvider: 0.092159032821655 | |
Illuminate\Filesystem\FilesystemServiceProvider: 0.092167139053345 | |
Illuminate\Foundation\Providers\FormRequestServiceProvider: 0.092272043228149 | |
Illuminate\Foundation\Providers\FoundationServiceProvider: 0.092282056808472 |