Skip to content

Instantly share code, notes, and snippets.

{
"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
<?php
class Store {
/**
* @var array
*/
public $state = [];
/**
* @param $reducer
find . -name \*.less -delete && find . -type d -empty -delete
@viankakrisna
viankakrisna / docker_kill.sh
Created May 22, 2017 05:46 — forked from evanscottgray/docker_kill.sh
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
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
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:
@viankakrisna
viankakrisna / build.js
Created October 7, 2017 11:17
CRA preact-compat + styled-components
process.env.NODE_ENV = 'production';
const config = require('react-scripts/config/webpack.config.prod');
config.module.rules[1].oneOf[1].options.plugins = [
'babel-plugin-styled-components',
];
config.resolve.alias['react'] = 'preact-compat';
config.resolve.alias['react-dom'] = 'preact-compat';
// Not necessary unless you consume a module using `createClass`
config.resolve.alias['create-react-class'] =
'preact-compat/lib/create-react-class';
const blacklisted = ['babel', 'eslint', 'webpack'];
const packageJson = require(paths.appPackageJson);
const dependencies = Object.keys(packageJson.dependencies);
const devDependencies = Object.keys(packageJson.devDependencies);
dependencies.concat(devDependencies).forEach(dependency => {
blacklisted.forEach(blacklist => {
if (dependency.startsWith(blacklist)) {
console.log();
console.log('installing', dependency, 'is not supported');
console.log('remove', dependency, 'by running `npm remove', dependency +'`')
(async () => {
const numbers = Array.from({ length: 329 }, (v, k) => k + 1);
var messageList = document.getElementById("messageList");
while (messageList.firstChild) {
messageList.removeChild(messageList.firstChild);
}
for (const number of numbers) {
const res = await fetch(
window.location.href.replace("page-329", `page-${number}`)
);
curl -s 'https://macapps.link/en/firefox-chrome-github-sourcetree-sequelpro-robomongo-sublime-androidstudio-espresso-poedit-intellij-docker-zeplin-postman-vscode-transmission-unarchiver-tunnelblick-etcher-coconutbattery-mactracker-spotify-openemu-steam-slack-whatsapp-discord' | sh
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install yarn --without-node
brew cask install dnscrypt