Skip to content

Instantly share code, notes, and snippets.

View rrubiorr81's full-sized avatar

Richard Rubio Roche rrubiorr81

View GitHub Profile
@rrubiorr81
rrubiorr81 / setup-dev.sh
Created February 28, 2016 16:35
Install homebrew, nginx, mysql, php55, and composer on Mac OS X
#!/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
@rrubiorr81
rrubiorr81 / README.md
Created February 25, 2016 17:56 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@rrubiorr81
rrubiorr81 / Adv command line
Created November 21, 2013 22:56
Adv command line
//
///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
@rrubiorr81
rrubiorr81 / Angular course notes
Created November 17, 2013 17:37
Angular course notes
//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...
@rrubiorr81
rrubiorr81 / laravel learning course
Created October 31, 2013 21:04
laravel learning course
/*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
@rrubiorr81
rrubiorr81 / Vagrant set-up
Created October 25, 2013 20:26
Vagrant setup
//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
@rrubiorr81
rrubiorr81 / LAMP with VB course notes
Created October 23, 2013 21:31
notes lamp course, virtual box
#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
@rrubiorr81
rrubiorr81 / MySql from the command line
Created October 20, 2013 01:32
mysql from the terminal
//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.
@rrubiorr81
rrubiorr81 / MongoDB course notes
Created October 15, 2013 20:27
mongo db commands
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()
@rrubiorr81
rrubiorr81 / gist course
Created October 4, 2013 02:12
git course
//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: