File and folder naming convention for React.js components
/actions/...
/components/common/Link.js
/components/common/...
/components/forms/TextBox.js
/components/forms/TextBox.res/style.css
| proxies = {'http' : 'http://10.10.0.0:0000', | |
| 'https': 'http://120.10.0.0:0000'} | |
| page_response = requests.get(page_link, proxies=proxies, timeout=5) |
| FROM php:7.0.4-fpm | |
| RUN apt-get update && apt-get install -y libmcrypt-dev \ | |
| mysql-client libmagickwand-dev --no-install-recommends \ | |
| && pecl install imagick \ | |
| && docker-php-ext-enable imagick \ | |
| && docker-php-ext-install mcrypt pdo_mysql |
| #!/bin/sh | |
| # Make sure to: | |
| # 1) Name this file `backup.sh` and place it in /home/ubuntu | |
| # 2) Run sudo apt-get install awscli to install the AWSCLI | |
| # 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
| # 4) Fill in DB host + name | |
| # 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
| # 6) Run chmod +x backup.sh | |
| # 7) Test it out via ./backup.sh |
| import * as models from "models"; | |
| import fs from "fs"; | |
| for(let model in models) { | |
| let attributes = models[model].attributes; | |
| for(let column in attributes) { | |
| delete attributes[column].Model; | |
| delete attributes[column].fieldName; |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| .sidebar_newsletter_sign_up, | |
| .sidebar_subscribe, | |
| .sign-up-form-single, | |
| .signup-form--header, | |
| .signup-with-checkboxes, | |
| .skinny-sign-up, | |
| .slidedown-newsletter, | |
| .small-newsletter, | |
| .social-link-mail, | |
| .social_newsletter_box, |
| #!/bin/bash | |
| # View Delimiter | |
| DLM='-------------------------------------' | |
| # Set Output Colors | |
| red=`tput setaf 1` | |
| green=`tput setaf 2` | |
| blue=`tput setaf 4` | |
| cyan=`tput setaf 6` |
| var gulp = require('gulp'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var source = require('vinyl-source-stream'); | |
| var buffer = require('vinyl-buffer'); | |
| var browserify = require('browserify'); | |
| var watchify = require('watchify'); | |
| var babel = require('babelify'); | |
| function compile(watch) { | |
| var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
| /** | |
| * VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
| * | |
| * To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
| * It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
| * the height of element `.foo` —which is a full width and height cover image. | |
| * | |
| * iOS Resolution Quick Reference: http://www.iosres.com/ | |
| */ | |