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 | |
palette='/tmp/palette.png' | |
filters='fps=15,scale=240:320:flags=lanczos' | |
dur=`echo "$2-$1" | bc` | |
ffmpeg -ss $1 -t $dur -i Cropped.mp4 -vf "$filters,palettegen" -y $palette | |
ffmpeg -ss $1 -t $dur -i Cropped.mp4 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse=dither=none" -y '/tmp/gif.gif' | |
gifsicle '/tmp/gif.gif' --optimize=100 > $3 |
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 Foo; | |
class Page { | |
function whoami() { | |
echo __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
<?php | |
trait Foo { | |
abstract private function qux(); | |
} | |
class Bar { | |
use Foo { qux as protected; } | |
} |
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 HackedDataQuery extends DataQuery { | |
public function __construct($dataQuery) { | |
$this->dataClass = $dataQuery->dataClass; | |
$this->query = $dataQuery->query; | |
} | |
public function selectField($fieldExpression, $alias = null) { | |
parent::selectField($fieldExpression, $alias); |
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 MyObject extends DataObject { | |
private static $db = array( | |
'Thumbnail' => 'File' | |
); | |
function thumbnailLink() { | |
return $this->obj('Thumbnail')->Link; |
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 MemberAutocompleteField extends TextField { | |
private static $allowed_actions = array('suggest'); | |
public $maxSuggestionsNum = 50; | |
public function Field($properties = array()) { | |
Requirements::javascript("mysite/javascript/MemberAutocompleteField.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
--- | |
After: | |
- cms | |
- framework | |
--- | |
SomeClass: | |
SomeProperty: 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
en: | |
CommentingController: | |
EMAILADDRESS: 'Email' |
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 CommentingControllerExtension extends Extension { | |
function alterCommentForm(Form $form) { | |
$fields = $form->Fields(); | |
$fields->removeByName('URL'); | |
} | |
} |
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
diff --git a/javascript/CMSMain.EditForm.js b/javascript/CMSMain.EditForm.js | |
index 35d8e44..58b49eb 100644 | |
--- a/javascript/CMSMain.EditForm.js | |
+++ b/javascript/CMSMain.EditForm.js | |
@@ -24,6 +24,8 @@ | |
+ | |
+ Title: null, | |
+ | |
// Constructor: onmatch | |
onmatch : function() { |
NewerOlder