Getting started:
Related tutorial: http://cd64.de/mysql-cli
SQL joins infografic: http://cd64.de/sql-joins
#!/bin/bash | |
# install homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# install homebrew's official php tap | |
brew tap josegonzalez/homebrew-php | |
Getting started:
Related tutorial: http://cd64.de/mysql-cli
SQL joins infografic: http://cd64.de/sql-joins
// | |
///math on the terminal... | |
//evaluating math expressions in the terminal... | |
expr 1 + 1 | |
//piping the content into bc.. | |
echo "1 + 3 * 12 - 3"| bc | |
bc | |
///pushing btw directories |
//angular course notes... 17/11/2013 | |
//main include | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script> | |
//defining the area where angular is going to look in... | |
<div ng-app> </div> | |
//inside this area u can do | |
<h2>{{2+5}}</h2> //and gets evalueted... or | |
<h2>{{"judith"+" the killer"}}</h2> | |
//the tags come "embeded" with natural html... |
/*learning laravel*/ | |
// dd($user->toArray()); --this two are valid... the 2nd pops out all of the users... | |
// dd($user::all()->toArray()); --select * anyway | |
dd($users->toArray()) //the output as an array | |
//installing and using composer |
//list of vagrant boxes | |
http://www.vagrantbox.es/ | |
//example | |
vagrant box add precise32 http://files.vagrantup.com/precise32.box | |
vagrant init precise32 | |
vagrant up | |
vagrant ssh |
#logging into the ubuntu server... | |
ssh -lusername -pporttouse hostname | |
ssh -lrichard -p2222 sandbox.dev //practical example... | |
sudo apt-get update // downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs | |
sudo apt-get -y upgrade //apt-get upgrade will fetch new versions of packages existing on the machine | |
// the -y stands for saying yes to all dialogs | |
//installing the needed packages for the communication btw the host and the server... | |
sudo apt-get -q -y install build-essential module-assistant linux-headers-$(uname -r) dkms zip unzip | |
//APT |
//If you are already running mysql, you can execute an SQL script file using the source command or \. command: | |
mysql> source file_name | |
mysql> \. file_name | |
//checking the mysql server variables | |
SHOW VARIABLES | |
//reseting the tables queries | |
The RESET QUERY CACHE statement removes all query results from the query cache. The FLUSH TABLES statement also does this. |
Mongo db console commands | |
//showing the existing dbs.. | |
show dbs | |
//use test | |
switching to db test, (only creating it when actually adding new data) | |
//prompts the name of the working db now | |
db | |
//the fllw would prompt the count(), in the link2 collection, in the current db... | |
>db.links2.count() |
//when working on a wrong branch-- to apply these changes to the interested branch... | |
git stash | |
git checkout branch123 | |
git stash apply | |
//assuring that the file is updated in git index.. and therefore, can be included in the .gitignore... | |
git update-index --assume-unchanged path/to/file | |
//git diff can show you the difference between two commits: |