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
############################################ | |
# Environment | |
############################################ | |
# production | |
# | |
# $ sudo nano /etc/environment | |
# -------------------------------------------------- | |
# export RAILS_ENV=production | |
# export RACK_ENV=production | |
# -------------------------------------------------- |
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
### PhpMyAdmin (by different root) | |
$ sudo apt-get install php5-mysql phpmyadmin | |
$ sudo apt-get install php5-fpm | |
$ sudo nano /etc/nginx/sites-available/default | |
location /phpmyadmin { | |
root /usr/share/; | |
index index.php index.html index.htm; |
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
# create migration file | |
$ rails generate migration AddPartNumberToProducts |
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
echo " " > /var/www/app/current/log/production.log |
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://stackoverflow.com/questions/16376010/ubuntu-cannot-install-rmagick | |
apt-get install libmagickwand-dev |
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
$ cp /etc/nginx/sites-available/default /etc/nginx/sites-available/staging | |
$ ln -s /etc/nginx/sites-available/staging /etc/nginx/sites-enabled/staging | |
$ nano /etc/nginx/sites-available/staging | |
server { | |
listen 80; | |
listen [::]:80; |
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
.filter("timeago", function () { | |
//time: the time | |
//local: compared to what time? default: now | |
//raw: wheter you want in a format of "5 minutes ago", or "5 minutes" | |
return function (time, local, raw) { | |
if (!time) return "never"; | |
if (!local) { | |
(local = Date.now()) | |
} |
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
# Download link: http://dev.mysql.com/downloads/connector/c/ | |
gem install mysql2 --platform=ruby -- '--with-mysql-dir="C:\mysql-connector"' |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"> | |
.... | |
<Extensions> | |
<Extension Category="windows.activatableClass.inProcessServer"> | |
<InProcessServer> |
OlderNewer