- Background: (39, 40, 34); #272822
- Comments: (103,157,71); #679D47
- White: (248, 248, 242); #F8F8F2
- String: (230, 219, 116); #E6DB74
- Green:(166, 226, 46); #A6E22E ;
var httpProxy = require('http-proxy');
This file contains hidden or 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
class TestYield | |
{ | |
private function clearDir() { | |
if (!is_dir('./files')) { | |
return; | |
} | |
if ($handle = opendir('./files')) { | |
while (false !== ($entry = readdir($handle))) { | |
if ($entry != "." && $entry != "..") { | |
// echo "$entry\n"; |
This file contains hidden or 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 Evolutionnutrition\ApiBundle\Tests\Base; | |
use Evolutionnutrition\ApiBundle\Tests\Base\BaseUnitTests; | |
abstract class BaseControllerTests extends BaseUnitTests | |
{ | |
protected $controllerMethodsList = [ | |
'parseControls', |
This file contains hidden or 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
(function() { | |
const links = document.getElementsByTagName('a'); | |
for (let i = 0; i < links.length; i++) { | |
const a = links.item(i); | |
if (a.href && a.href.search('screencast.com') >= 0) { | |
console.log('screencast link', i, a); | |
let ifrFound = false; | |
for (let j = 0; j < a.childNodes.length; j++) { | |
if (a.childNodes.item(j).nodeName === 'IFRAME') { | |
ifrFound = true; |
This file contains hidden or 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
function getCaretPosition (value) { | |
// Initialize | |
let iCaretPos = 0; | |
const field = document.activeElement; | |
// IE Support | |
if (document.selection) { | |
// To get cursor position, get empty selection range |
This file contains hidden or 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 React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { parseDate, formatInput, formatDate } from './helpers'; | |
class FormattedDateField extends React.PureComponent { | |
static propTypes = { | |
date: PropTypes.instanceOf(Date), | |
onChange: PropTypes.func.isRequired, | |
}; |
This file contains hidden or 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
/* | |
.ol-level-1 > .li-level-1 > .ol-level-2 > .li-level-2, .li-level-2_alpha counters | |
*/ | |
.ol-level-1, .ol-level-2 { | |
list-style-type: none; | |
counter-reset: terms-counter-y 0; | |
} | |
.li-level-1, .li-level-2 { | |
counter-increment: terms-counter-y 1; | |
} |
This file contains hidden or 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
const fs = require('fs'); | |
const path = require('path'); | |
const async = require('async'); | |
function rmDir(dirPath, cb, removeSelf = true) { | |
try { | |
fs.readdir(dirPath, (err, files) => { | |
if (err) return cb(err); | |
// run tasks in parallel | |
async.each(files, (file, cb) => { |
This file contains hidden or 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
const allowEvery = (f, delay = 300) => { | |
let timeOut = null; | |
let lastCall = null; | |
return (...args) => { | |
const n = Date.now(); | |
if (lastCall === null) { | |
lastCall = n; | |
} else if (n - lastCall > delay) { | |
lastCall = n; | |
f(...args); |
NewerOlder