⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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 | Bank Holiday | Date | |
---|---|---|---|
New Year's Day | 1 | 2009-01-01 | |
Robert Burns Night (Burns Night) | 0 | 2009-01-25 | |
Holocaust Memorial Day | 0 | 2009-01-27 | |
Valentines Day | 0 | 2009-02-14 | |
Shrove Tuesday (Pancake Day) | 0 | 2009-02-24 | |
Ash Wednesday | 0 | 2009-02-25 | |
St David's Day | 0 | 2009-03-01 | |
St Patricks Day | 0 | 2009-03-17 | |
Mothering Sunday (Mothers Day) | 0 | 2009-03-22 |
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
Vue.filter('limit', function(array, length) { | |
var limitCount = parseInt(length, 10); | |
if (limitCount <= 0) { | |
("development") !== 'production' && _.warn( | |
'The limit filter requires an argument defining the limit count.' | |
); | |
return array; | |
} | |
return array.slice(0, limitCount); | |
}); |
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\Model\Table; | |
trait saveAllTrait { | |
public function saveAll($entities = [], $options = null) { | |
if($options === null) { | |
return array_map([$this, 'save'], $entities); | |
} | |
$saved_entities = []; |
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 | |
$null = null; | |
$notNull = 123; | |
$is_null = function($value) { | |
for($i = 0; $i < 1000000; $i++) { | |
$result = is_null($value); | |
} | |
return "is_null"; | |
}; |
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/env xdg-open | |
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Terminal=false | |
StartupNotify=true | |
Name=Smartgit | |
Exec=env SMARTGIT_JAVA_HOME=/opt/apps/jre7/ /opt/apps/smartgit/bin/smartgit.sh | |
Icon=/opt/apps/smartgit/bin/smartgit-64.png |
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
/* | |
* An example of how to use a Google Map overlay to display a label on top of marker. | |
* This is a slight re-work of http://www.tdmarketing.co.nz/blog/2011/03/09/create-marker-with-custom-labels-in-google-maps-api-v3/ | |
* I suggest you rather view that blog post, this code is pasted here purely for my own personal reference. | |
*/ | |
var | |
point = { | |
lat: 37.8478115, | |
long: 15.2934327 |
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 | |
/** | |
* imageColor | |
* | |
* Shows three methods to find the 'average' image color. | |
* | |
* Each function expects a gd image object. | |
* | |
* imageColor::averageResize($image) resizing to 1px, and checking the color. | |
* imageColor::averageBorder($image) find the average color of all border pixels. |