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
Note: I've left some of the full package names in tact to show exactly where the class comes from. | |
#### Pull dependencies in using composer #### | |
//Example composer.json | |
{ | |
"require": { | |
"symfony/config" : "2.1.0", | |
"symfony/yaml" : "2.1.0", | |
"twig/twig": "1.9.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
<?php | |
namespace Tentacode\FilesystemBundle\XML; | |
use DOMDocument; | |
use XMLReader; | |
class XSDValidator | |
{ | |
protected $xmlFile; |
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 | |
/* | |
|-------------------------------------------------------------------------- | |
| 5 Star Rating | |
|-------------------------------------------------------------------------- | |
| | |
| Lower bound of Wilson score confidence interval for a Bernoulli parameter (0.9604) | |
| | |
| See: |
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 ReactUpdates from 'react-dom/lib/ReactUpdates' | |
import ReactDefaultBatchingStrategy from 'react-dom/lib/ReactDefaultBatchingStrategy' | |
import 'isomorphic-fetch' | |
const logError = (err, extra = {}) => { | |
fetch('/logger', { | |
method: 'POST', | |
credentials: 'same-origin', | |
headers: { 'Content-Type': 'application/json' }, | |
body: JSON.stringify({ |
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
version: '3' | |
services: | |
redis: | |
image: redis | |
container_name: redis | |
postgres: | |
image: 'postgres' | |
container_name: postgres |
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 \Sabre\VObject; | |
// use composer autoloader | |
require_once 'vendor/autoload.php'; | |
/** | |
* Returns a VTIMEZONE component for a Olson timezone identifier | |
* with daylight transitions covering the given date range. |
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
from __future__ import absolute_import, print_function, unicode_literals | |
import boto3 | |
def clean_old_lambda_versions(): | |
client = boto3.client('lambda') | |
functions = client.list_functions()['Functions'] | |
for function in functions: | |
versions = client.list_versions_by_function(FunctionName=function['FunctionArn'])['Versions'] | |
for version in versions: |
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
REM Usage: hugin_stitch.bat template-XiaomiMijiaMiJPG.pto IMG_20171231_172305.jpg | |
@echo off | |
SET PATH=%PATH%;C:\Program Files\Hugin\bin | |
FOR %%i IN ("%2") DO ( | |
SET Name=%%~ni | |
) | |
pto_gen %2 %2 --output=%Name%_stitched.pto |
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
Mr | |
Mrs | |
Master | |
Miss | |
Ms | |
Mx | |
Dr | |
Admiral | |
Air Comm | |
Ambassador |
OlderNewer