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
Bringing machine 'default' up with 'virtualbox' provider... | |
[default] Setting the name of the VM... | |
[default] Clearing any previously set forwarded ports... | |
[default] Creating shared folders metadata... | |
[default] Clearing any previously set network interfaces... | |
There was an error while executing `VBoxManage`, a CLI used by Vagrant | |
for controlling VirtualBox. The command and stderr is shown below. | |
Command: ["hostonlyif", "create"] |
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
ubuntu@ip-10-248-47-171:~$ cat /etc/proftpd/proftpd.conf | |
# | |
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file. | |
# To really apply changes, reload proftpd after modifications, if | |
# it runs in daemon mode. It is not required in inetd/xinetd mode. | |
# | |
# Includes DSO modules | |
Include /etc/proftpd/modules.conf |
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
First, make sure you already have git installed on local and remote server. | |
On remote server | |
---------------- | |
$ cd ~/ #if you are not here yet | |
$ mkdir website.git && cd website.git | |
$ git init --bare | |
Initialized empty Git repository in /home/ubuntu/website.git/ | |
$ vi hooks/post-receive # paste the post-receive file here |
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
git shortlog -s -n |
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
#import a single json file | |
$ mongoimport -h 127.0.0.1 -c subprovider -db techtravel --file subprovider.json | |
#import csv file | |
$ mongoimport -d mydb -c things --type csv --file locations.csv --headerline | |
#export a single collection | |
$ mongoexport --db techtravel --collection subprovider --out /var/www/techtravel/storage/database/2013-04-03/subprovider.json | |
#export a single collection but specific data from that collection |
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
$environments = array( | |
'development' => array('http://localhost*', '*.dev'), | |
'production' => array('http://mywebsite.com*', '*.mywebsite.com'), | |
); |
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
$ sudo pecl install mongo | |
downloading mongo-1.3.3.tgz ... | |
Starting to download mongo-1.3.3.tgz (122,098 bytes) | |
...........................done: 122,098 bytes | |
49 source files, building | |
running: phpize | |
Configuring for: | |
PHP Api Version: 20090626 | |
Zend Module Api No: 20090626 | |
Zend Extension Api No: 220090626 |
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
Problem: | |
$ vagrant up | |
[default] VM already created. Booting if its not already running... | |
[default] Running any VM customizations... | |
[default] Clearing any previously set forwarded ports... | |
[default] Forwarding ports... | |
[default] -- ssh: 22 => 2222 (adapter 1) | |
[default] -- db2: 30003 => 30003 (adapter 1) | |
[default] Cleaning previously set shared folders... |
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
## based on http://www.developerzen.com/2011/01/10/show-the-current-git-branch-in-your-command-prompt/ | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
BLUE="[\033[0;34m\]" | |
DARK_BLUE="[\033[1;34m\]" | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" |
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
#vc dentro de Iframeid | |
parent.document.getElementById("IframeId"); | |
#vc fora dos iframes tentando chamar uma funcão javascript que está dentro de um iframe | |
document.getElementById("IframeId").contentWindow.HelloWorld(); | |
#pegar conteúdo do iframe | |
var iframe = parent.document.getElementById( "iframeReport"); | |
var innerDoc = iframe.contentDocument || iframe.contentWindow.document; |