- Cluster Quota
oc create clusterquota env-qa \
--project-label-selector environment=qa \
--hard pods=10,services=5
oc create clusterquota user-qa \
#!/bin/shell | |
echo "Hey, I heard you want to install libicu on Dreamhost... Let me help you out! :D" | |
if [ ! -d "$HOME/usr/local" ]; then | |
mkdir -p ~/usr/local | |
fi | |
if [ -d "$HOME/icu" ]; then | |
echo "Removing the folder ~/icu..." |
# Exponential backoff in Ruby | |
begin | |
make_request | |
rescue RequestError => e | |
if retries <= max_retries | |
retries += 1 | |
sleep 2 ** retries + rand(20) | |
retry | |
else | |
raise "Timeout: #{e.message}" |
#! /bin/sh | |
usage_error () { | |
echo 'Usage: sh migrator.sh <path to sqlite_to_postgres.py> <path to sqlite db file> <an empty dir to output dump files>' | |
echo | |
echo 'Example:' | |
echo '>sh migrator.sh sqlite_to_postgres.py ~/reviewboard.db /tmp/dumps' | |
echo | |
echo 'Tested on:' | |
echo 'Python 2.7.3' |
#!/bin/bash | |
REPO=NAME_HERE | |
# Dir paths on remote server | |
# These are associated with branches within a git project | |
LIVE_BRANCH="master" | |
LIVE="git@host:/var/www/live/" | |
STAGE_BRANCH="develop" | |
STAGE="git@host:/var/www/stage/" |
import { Component, forwardRef, Renderer2, ViewChild } from '@angular/core'; | |
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; | |
export const EPANDED_TEXTAREA_VALUE_ACCESSOR : any = { | |
provide: NG_VALUE_ACCESSOR, | |
useExisting: forwardRef(() => TextareaExpandedComponent), | |
multi: true, | |
}; | |
@Component({ |
#!/bin/bash | |
# Install csvkit with csvpys | |
# (csvpys hasn't been pulled back into the main csvkit repo that you can pip install) | |
git clone https://github.com/cypreess/csvkit.git | |
cd csvkit | |
python setup.py build | |
sudo python setup.py install | |
cd ~ |
#! /usr/bin/env ruby | |
# NOTE: Requires Ruby 2.1 or greater. | |
# This script can be used to parse and dump the information from | |
# the 'html/contact_info.htm' file in a Facebook user data ZIP download. | |
# | |
# It prints all cell phone call + SMS message + MMS records, plus a summary of each. | |
# | |
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created |
postgres: | |
image: postgres:9.4 | |
volumes: | |
- ./init.sql:/docker-entrypoint-initdb.d/init.sql |
This is a simple way of importing MySQL database in Docker.
In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.
Put the exported sql file in the shared folder.
Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash
.
Login to MySQL via mysql -u USERNAME -p
.