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
function verify_uglifyjs_error { | |
# Create stub dependency | |
echo "module.exports = class {}" >> node_modules/es6-sample.js | |
# Save App.js, we're going to modify it | |
cp src/App.js src/App.js.bak | |
# Add an es6 dependency | |
echo "import es6 from 'es6-sample'" | cat - src/App.js > src/App.js.temp && mv src/App.js.temp src/App.js | |
if `npm run build` | grep -xqFe "Failed to minify the code from this file: |
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
function verify_uglifyjs_error { | |
# Create stub dependency | |
echo "module.exports = class {}" >> packages/react-scripts/node_modules/es6-sample.js | |
# Save App.js, we're going to modify it | |
cp packages/react-scripts/template/src/App.js packages/react-scripts/template/src/App.js.bak | |
# Add an es6 dependency | |
echo "import es6 from 'es6-sample'" | cat - packages/react-scripts/template/src/App.js > packages/react-scripts/template/src/App.js.temp && mv packages/react-scripts/template/src/App.js.temp packages/react-scripts/template/src/App.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
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
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
find . -name \*.less -delete && find . -type d -empty -delete |
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 Store { | |
/** | |
* @var array | |
*/ | |
public $state = []; | |
/** | |
* @param $reducer |
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
Show hidden characters
{ | |
"codeformatter_debug": false, | |
"codeformatter_php_options": | |
{ | |
"syntaxes": "php", // Syntax names which must process PHP formatter | |
"php_path": "/usr/bin/php", // Path for PHP executable, e.g. "/usr/lib/php" or "C:/Program Files/PHP/php.exe". If empty, uses command "php" from system environments | |
"format_on_save": true, // Format on save. Either a boolean (true/false) or a string regexp tested on filename. Example : "^((?!.min.|vendor).)*$" | |
"php55_compat": false, // PHP 5.5 compatible mode | |
"psr1": true, // Activate PSR1 style |
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 React from "react"; | |
let store; | |
export default function createStore( | |
reducer, | |
initialState = {}, | |
...middlewares | |
) { | |
const subscribers = []; | |
let newState = initialState; |
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
function elt(name, attributes) { | |
var node = document.createElement(name); | |
if (attributes) { | |
for (var attr in attributes) | |
if (attributes.hasOwnProperty(attr)) | |
node.setAttribute(attr, attributes[attr]); | |
} | |
for (var i = 2; i < arguments.length; i++) { | |
var child = arguments[i]; | |
if (typeof child == "string") |
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
for f in $(find $dir -name '*.php'); | |
do | |
(./wp-phptidy.php replace $f) | |
done | |
for f in $(find $dir -name '*.phptidybak~'); | |
do | |
(rm -f $f) | |
done |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |