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 Sunnysideup\Web\Tasks; | |
use DirectoryIterator; | |
use SilverStripe\Control\Director; | |
use SilverStripe\Control\Email\Email; | |
use SilverStripe\Dev\BuildTask; | |
class SendPdfViaEmail extends BuildTask |
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 MyAmazingWebsite\App\Model\Logs; | |
use SilverStripe\ORM\DB; | |
use SilverStripe\ORM\DataList; | |
use SilverStripe\ORM\DataObject; | |
use SilverStripe\Core\Flushable; |
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
// prepare the array by adding level, ID and parent to each item of the array | |
function prepare (array) { | |
let level, t | |
for (let i = 0, n = array.length; i < n; i++) { | |
t = array[i] | |
t.el = t | |
level = parseInt(t.tagName[1], 10) | |
t.level = level | |
t.idt = i + 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
# RESULTS /src/Control: | |
```txt | |
------ ---------------------------------------------------------------------------------------------------------------------- | |
Line Controller.php | |
------ ---------------------------------------------------------------------------------------------------------------------- | |
128 Negated boolean expression is always true. | |
201 Negated boolean expression is always false. |
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 | |
# source: https://askubuntu.com/questions/1075157/unable-to-set-my-screen-resolution-higher | |
xrandr | |
cvt 1920 1080 | |
sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync | |
sudo xrandr --addmode VGA-1 "1920x1080_60.00" |
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": "ss-webpack", | |
"version": "2.11.2", | |
"description": "A silverstripe theme setup using webpack to bundle assets and provide a front end build system. ", | |
"main": "index.js", | |
"scripts": { | |
"watch": "NODE_ENV=development webpack-dashboard -- webpack-dev-server", | |
"dev": "NODE_ENV=development webpack --progress", | |
"build": "NODE_ENV=production webpack --progress" | |
}, |
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 | |
use SilverStripe\Core\Extension; | |
use SilverStripe\Forms\GridField\GridField_ActionMenu; | |
use SilverStripe\Forms\GridField\GridFieldDeleteAction; | |
class GridFieldConfig_RecordEditor_Fix extends Extension | |
{ | |
function updateConfig() |
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 Page { | |
function getCMSFields() | |
{ | |
$fields = parent::getCMSFields(); | |
$publishingDetails = ToggleCompositeField::create( | |
'PublishingHolderToggle', | |
'Publishing', | |
$fields->fieldByName('Root.PublishingSchedule') |
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 MyExampleDeleteAllForPage extends Object | |
{ | |
private static function delete_page($idOrPage) | |
{ | |
if($idOrPage instanceof SiteTree) { | |
$id = $idOrStage->ID; |
NewerOlder