./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
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
| 'use strict'; | |
| class Abstract { | |
| // A static abstract method. | |
| static foo() { | |
| if (this === Abstract) { | |
| // Error Type 2. Abstract methods can not be called directly. | |
| throw new TypeError("Can not call static abstract method foo."); | |
| } else if (this.foo === Abstract.foo) { | |
| // Error Type 3. The child has not implemented this method. | |
| throw new TypeError("Please implement static abstract method foo."); |
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
| #!/bin/bash | |
| echo "create new version of nativefier-wrokchat" | |
| nativefier -i ./workplace.png https://fb.workplace.com -n nativefier-workchat | |
| if [ -d "/Applications/nativefier-workchat.app" ]; then | |
| echo "backup..." | |
| mv /Applications/nativefier-workchat.app ~/Desktop/nativefier-workchat-backup.app | |
| echo "done => ~/Desktop" | |
| fi |
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
| #!/bin/bash | |
| # file: ttfb.sh | |
| # curl command to check the time to first byte | |
| # ** usage ** | |
| # 1. ./ttfb.sh "https://google.com" | |
| # 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com" | |
| curl -o /dev/null \ | |
| -H 'Cache-Control: no-cache' \ | |
| -s \ |
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
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 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
| #!/usr/bin/env bash | |
| ENV_PATH="$(dirname "$(dirname "$(which pip)")")" | |
| SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)" | |
| echo "Ensure the root of current virtualenv:" | |
| echo " $ENV_PATH" | |
| read -p "‼️ Say no if you are not sure (y/N) " -n 1 -r | |
| echo | |
| if [[ $REPLY =~ ^[Yy]$ ]]; then | |
| echo "♻️ Removing old symbolic links......" |
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
| # Determines the "branch" of the current repo and emits it. | |
| # For use in generating the prompt. | |
| # This is portable to both zsh and bash and works in both | |
| # git and mercurial repos and aims to avoid invoking the | |
| # command line utilities for speed of prompt updates | |
| # To use from zsh: | |
| # NOTE! the single quotes are important; if you use double quotes | |
| # then the prompt won't change when you chdir or checkout different | |
| # branches! |
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
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
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
| var gulp = require('gulp'); | |
| var browserify = require('browserify'); | |
| var babelify = require('babelify'); | |
| var source = require('vinyl-source-stream'); | |
| var buffer = require('vinyl-buffer'); | |
| var uglify = require('gulp-uglify'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var livereload = require('gulp-livereload'); |
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
| // usage: node compile.js src lib/Adminhtml watch | |
| // | |
| // following dev dependencies are needed | |
| // | |
| // { | |
| // "devDependencies": { | |
| // "babel-preset-es2015": "^6.3.13", | |
| // "babel-preset-react": "^6.3.13", | |
| // "babelify": "^7.2.0", | |
| // "browserify": "^13.0.0", |