apt-get install -y --allow-downgrades --allow-remove-essential --allow-change-held-packages \
php7.0-cli php7.0-dev \
php7.0-pgsql php7.0-sqlite3 php7.0-gd \
php7.0-curl php7.0-memcached \
php7.0-imap php7.0-mysql php7.0-mbstring \
php7.0-xml php7.0-zip php7.0-bcmath php7.0-soap \
php7.0-intl php7.0-readline php-xdebug php-pear php7.0-fpm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read email in inbox, look for any URLs and update them to wallabag, delete email if URLs found in it. | |
# Built from various internet sources. Final code donated under GPL v3 by Github user aptgetupgrade | |
# Tested using python 2. Could be run as part of a crontab, e.g. every 5 mins. | |
# | |
import sys | |
import imaplib | |
import getpass | |
import email | |
import email.header | |
import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cd "${THIS_SCRIPT_DIR}/.." | |
# Check if there's something uncommitted (don't release if there are files | |
# not yet committed) | |
set +e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.dizzy.co.uk/cheatsheets | |
This work is licensed under the Creative Commons | |
Attribution-NonCommercial-NoDerivs 2.0 License. To | |
view a copy of this license, visit | |
http://creativecommons.org/licenses/by-nc-nd/2.0/uk | |
########## Shell Commands ########## | |
Installation: | |
$ gem install capistrano |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From a fresh install of squeeze | |
apt-get install ruby rubygems # Need ruby to use fpm | |
gem1.8 install fpm --no-ri --no-rdoc | |
apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -zxvf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125 | |
rm -rf /tmp/ruby193 |
Let's say you're a web developer who happens to work with both MAMP and Ruby when building different types of websites. Let's say you also like to keep your MySQL stuff in one place and don't like having to juggle both a local MySQL install as well as a MAMP MySQL install. Well, you can indeed connect your ruby apps to MAMP's MySQL. Here's a tutorial on how to do it.
Important! Before you do anything, download and install MAMP. MAMP Pro will work as well. At the time of this writing, MAMP 2.1.1 is the latest.
- Install homebrew
- Install rbenv:
brew install rbenv
, follow any instructions homebrew gives you after the installation is complete.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initial setup | |
git clone -o framework -b develop https://github.com/laravel/laravel.git project-name | |
cd project-name | |
git checkout --orphan master | |
git add . | |
git commit -m "Initial commit" | |
# Pulling changes | |
git fetch framework | |
git merge --squash -m "Upgrade Laravel" framework/develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'ControllerTestCase.php'; | |
class AccountControllerTest extends ControllerTestCase | |
{ | |
public function testSignupWithNoDataRedirectsAndHasErrors() | |
{ | |
$response = $this->post('account@signup', array()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Auth extends Laravel\Auth {} | |
/** | |
* @method static add(string $name, string $source, array $dependencies = array(), array $attributes = array()) | |
* @method static string styles() | |
* @method static string scripts() | |
*/ | |
class Asset extends Laravel\Asset {} | |
class Autoloader extends Laravel\Autoloader {} | |
class Bundle extends Laravel\Bundle {} |
NewerOlder