Warning: This guide contains system-level modifications. Some steps are irreversible or can render your system unbootable. Read every section fully before executing any command. Know what you are doing, or do not proceed.
| # | Section |
|---|
Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.
rebase vs merge).rebase vs merge)reset vs checkout vs revert)git rev-parse)pull vs fetch)stash vs branch)reset vs checkout vs revert)| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure(2) do |config| | |
| config.vm.box = "parallels/centos-7.3" | |
| #config.vm.network "forwarded_port", guest: 80, host: 8080 | |
| config.vm.network "public_network" | |
| config.vm.provider "parallels" do |v| |
| e[dit] | evil-edit |
| w[rite] | evil-write |
| wa[ll] | evil-write-all |
| sav[eas] | evil-save |
| r[ead] | evil-read |
| b[uffer] | evil-buffer |
| bn[ext] | evil-next-buffer |
| bp[revious] | evil-prev-buffer |
| bN[ext] | bprevious |
| sb[uffer] | evil-split-buffer |
| 1. disable Base repo | |
| sed -i.bak '/^gpgcheck=1/ a enabled=0 ' /etc/yum.repos.d/CentOS-Base.repo | |
| 2. append Vault repo with CentOS 6.7 | |
| #----------------- | |
| [C6.7-base] | |
| name=CentOS-6.7 - Base | |
| baseurl=http://vault.centos.org/6.7/os/$basearch/ | |
| gpgcheck=1 |
| #!/usr/bin/env bash | |
| INSTALL_MEDIA="http://cdimage.debian.org/cdimage/jessie_di_beta_2/amd64/iso-cd/debian-jessie-DI-b2-amd64-netinst.iso" | |
| VMNAME="debian-jessie-vm" | |
| [[ "x$1" != "x" ]] && VMNAME=$1 | |
| echo | |
| echo "Building VM: $VMNAME" | |
| echo " Creating disk image" |
| # Install tmux on Centos release 6.5 | |
| # install deps | |
| yum install gcc kernel-devel make ncurses-devel | |
| # DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
| curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
| tar -xvzf libevent-2.0.21-stable.tar.gz | |
| cd libevent-2.0.21-stable | |
| ./configure --prefix=/usr/local |
| /* ******************************************************************************************* | |
| * THE UPDATED VERSION IS AVAILABLE AT | |
| * https://github.com/LeCoupa/awesome-cheatsheets | |
| * ******************************************************************************************* */ | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |
| // 1. The signum of a number is 1 if the number is positive, -1 if it is negative, and | |
| // 0 if it is zero. Write a function that computes this value. | |
| def signum(n: Int) = { | |
| if (n > 0) 1 | |
| else if (n < 0) -1 | |
| else 0 | |
| } //> signum: (n: Int)Int | |
| signum(4) //> res0: Int = 1 |