Skip to content

Instantly share code, notes, and snippets.

View christianrojas's full-sized avatar

Christian Rojas christianrojas

View GitHub Profile
2012-01-18 15:34:52 UTC
Subject: Remote MySQL data base connection
Original message from you to Webbynode support (2012-01-18 15:34:52 UTC)
Hi!.
I need to know, how to connect to the webby MySQL database from my local computer.
i'am using
remote: ----------------------------
remote: Webbynode git deployment
remote: ----------------------------
remote:
remote: Nginx+Passenger webserver detected...
remote: Setting up DNS...
remote:
remote: Deploying application centro-cristiano-internacional as centro-cristiano-internacional.webbyapp.com...
remote:
remote: Configuring addons...
elasticsearchapp|⇒ brew install elasticsearch
==> Downloading https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.5.tar.gz
######################################################################## 100.0%
==> Caveats
If this is your first install, automatically load ElasticSearch on login with:
mkdir -p ~/Library/LaunchAgents
ln -nfs /usr/local/Cellar/elasticsearch/0.18.5/org.elasticsearch.plist ~/Library/LaunchAgents/
launchctl load -wF ~/Library/LaunchAgents/org.elasticsearch.plist
If this is an upgrade and you already have the org.elasticsearch.plist loaded:
elasticsearchapp|master ⇒ wn add_backup
Webbynode Rapid App Backup
This service will backup a dump of your application Database and the contents
of your application folder to a bucket on Amazon S3. If you don't have an
Amazon S3 account or if you don't know how to create one, please check our
guide on http://guides.webbynode.com/articles/rapidapps/backup.html.
DISCLAIMER: Backing up to S3 will incur on a charge by Amazon according to the
terms of the services contract you accepted when signing up to their services.
@christianrojas
christianrojas / Ubuntu_12.10_64Bits_Server.md
Last active December 14, 2015 21:39
Setup Ubuntu Server 12.10 64 bits / VPS / Nginx / Unicorn / Postfix / Add a deploy user / rbenv / Ruby 1.9.3-p392

VPS Setup Ubuntu 12.10

Update Box

sudo apt-get update
sudo apt-get upgrade -y

Install Dependecies

.bs-callout {
margin: 20px 0;
padding: 15px 30px 15px 15px;
border-left: 5px solid #eee;
}
.bs-callout-danger {
background-color: #fcf2f2;
border-color: #dFb5b4;
}
# brew install command line:
ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)”
@christianrojas
christianrojas / wordpress_fix.sh
Last active August 29, 2015 13:55
Wordpress owner group and permissions
#!/bin/bash
PATH=/path/to/WP/folder
echo "chown entire wp folder"
chown -R -f www-data:www-data $PATH
echo "securing the entire wp folder"
find $PATH -type d -exec chmod 755 {} \;
find $PATH -type f -exec chmod 644 {} \;
chmod 440 $PATH/*.php # verified minimum OK with WP
find $PATH/wp-admin -type f -exec chmod 640 {} \;
@christianrojas
christianrojas / chmod.sh
Created March 3, 2014 19:12
Terminal commands for chmod on folders and files
# Set agatha to user and admin to group recursively
chown -R agatha:admin [Folder]/
# Set to user and group the read and write permissions recursively
chmod -R ug=rw [Folder]/
require "rest_client"
RestClient.post "http://localhost:3000/resource_name",
resource_name: {
name: 'Consectetur Lorem Fusce',
photo: File.new("/path/to/file.jpg", 'rb')
}, :content_type => :json,
:accept => :json