- Установка необходимых пакетов:
sudo apt-get install zsh
Если еще не установлен git, то: sudo apt-get install git
- Клонируем репозиторий oh-my-zsh
| module.exports = (string) => { | |
| return string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase(); | |
| }; |
| import { CALL_API } from 'redux-api-middleware' | |
| export function fetchLocations() { | |
| return { | |
| [CALL_API]: { | |
| endpoint: 'http://api.somesite.com/api/locations', | |
| method: 'GET', | |
| // Don't have to manually add the Authorization header to every request. | |
| headers: { 'Content-Type': 'application/json' }, | |
| types: ['REQUEST', 'SUCCESS', 'FAILURE'] |
| import argparse | |
| import boto.sqs | |
| import json | |
| import os | |
| parser = argparse.ArgumentParser(description='Saves all messages from an AWS SQS queue into a folder.') | |
| parser.add_argument( | |
| '-q', '--queue', dest='queue', type=str, required=True, | |
| help='The name of the AWS SQS queue to save.') |
| <?php | |
| class Foo | |
| { | |
| private $foo; | |
| private $bar; | |
| private $baz; | |
| } | |
| $hydrator = function(array $data) { |
| package port | |
| import ( | |
| "net" | |
| "strconv" | |
| ) | |
| // New gets an available port | |
| func New() (port int, err error) { |
| # The command finds the most recent tag that is reachable from a commit. | |
| # If the tag points to the commit, then only the tag is shown. | |
| # Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
| # and the abbreviated object name of the most recent commit. | |
| git describe | |
| # With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
| git describe --abbrev=0 | |
| # other examples |
| map $http_origin $allow_origin { | |
| default ""; | |
| "~^https?://(?:[^/]*\.)?(stevebuzonas\.(?:com|local))(?::[0-9]+)?$" "$http_origin"; | |
| } | |
| map $request_method $cors_method { | |
| default "allowed"; | |
| "OPTIONS" "preflight"; | |
| } |
| #!/bin/bash | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi | |
| apt-get update | |
| apt-get install -y git-core autoconf bison libxml2-dev libbz2-dev libmcrypt-dev libcurl4-openssl-dev libltdl-dev libpng-dev libpspell-dev libreadline-dev make | |
| mkdir -p /etc/php7/conf.d | |
| mkdir -p /etc/php7/cli/conf.d | |
| mkdir /usr/local/php7 |
[Источник] (http://culttt.com/2014/09/08/benefits-using-repositories)
Если вы читали мои предыдущие посты, то вы, наверное, уже знаете, что из себя представляют репозитории.
Но понимаете ли вы, что является причинами для использования Репозиториев? Хотя для некоторых причины использования паттерна очевидны, я думаю, многие люди всё ещё ищут их.