Replace IRB with Pry (in your Gemfile) and Byebug with pry-byebug.
gem 'pry-rails', group: [:development, :test]
gem 'pry-byebug', group: [:development, :test]To remove a submodule you need to:
| /** | |
| * Get a random floating point number between `min` and `max`. | |
| * | |
| * @param {number} min - min number | |
| * @param {number} max - max number | |
| * @return {number} a random floating point number | |
| */ | |
| function getRandomFloat(min, max) { | |
| return Math.random() * (max - min) + min; | |
| } |
Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
| /* | |
| In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
| server, but for some reason omit a client connecting to it. I added an | |
| example at the bottom. | |
| Save the following server in example.js: | |
| */ | |
| var net = require('net'); |
| #!/bin/sh | |
| # Called by "git push" after it has checked the remote status, | |
| # but before anything has been pushed. | |
| # | |
| # If this script exits with a non-zero status nothing will be pushed. | |
| # | |
| # Steps to install, from the root directory of your repo... | |
| # 1. Copy the file into your repo at `.git/hooks/pre-push` | |
| # 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
| #/bin/bash | |
| #-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
| REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
| if [ -z "$REPO_URL" ]; then | |
| echo "-- ERROR: Could not identify Repo url." | |
| echo " It is possible this repo is already using SSH instead of HTTPS." | |
| exit | |
| fi |
| #!/bin/zsh | |
| function actual_path() { | |
| if [ [ -z "$1" ] -a [ -d $1 ] ]; then | |
| echo $(cd $1 && test `pwd` = `pwd -P`) | |
| return 0 | |
| else | |
| return 1 | |
| fi | |
| } |
| #!/bin/bash | |
| function actual_path() { | |
| if [ [ -z "$1" ] -a [ -d $1 ] ]; then | |
| echo $(cd $1 && test `pwd` = `pwd -P`) | |
| return 0 | |
| else | |
| return 1 | |
| fi | |
| } |
| <?php | |
| function paginate(Doctrine\ORM\Query $query, $page, $limit, $fetchJoinCollection = true) | |
| { | |
| // If we don't have a page just return the result | |
| if( ! $page && ! $limit) | |
| { | |
| return $query->getResult(); | |
| } |