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
// vim: syntax=javascript | |
// angular, create new project named "doomsday" | |
ng new doomsday | |
// angular, generate component | |
ng g c welcome-component | |
ng g g - generate guard | |
ng g m products/product --flat -m app |
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
cd - create or move to directory | |
rm node-modules - remove |
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
// vim: syntax=ruby | |
#Array | |
adress = [1,2,3,4,5,6] | |
p adress | |
p adress[0] | |
new_adress = adress.reverse! | |
p new_adress | |
# Printto 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
$ gem install rsense | |
// Create file | |
$ touch demo | |
//Run file | |
$ ruby demo.rb | |
// console interactive ruby | |
$ irb |
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
$ rails new api-project --api --no-sprockets -d postgresql | |
| | | | |
| v | | |
v NO Asset Pipeline | | |
only API v | |
use Postgresql as DB | |
$ rails generate model contact | |
$ rails g controller v1/contacts |
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 -version | |
$ git config --global user.name "SomeUserName" | |
$ git config --global user.email "user#gmail.com" | |
$ git config | |
$ git config --list | |
// STARTER | |
$ git init | |
// ADD ALL | |
$ git add . |
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://billpatrianakos.me/blog/2013/10/13/list-of-rails-status-code-symbols/ |
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
const Url = use('url-parse') | |
const CLEARDB_DATABASE_URL = new Url(Env.get('CLEARDB_DATABASE_URL')) |
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
"dependencies": { | |
... | |
"mysql": "2.18.1", | |
"url-parse": "1.4.7" | |
} |
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
const { test, trait } = use('Test/Suite')('User'); | |
const User = use('App/Models/User'); | |
trait('Test/ApiClient'); | |
trait('Auth/Client'); | |
trait('DatabaseTransactions'); | |
test('create new user', async ({ assert, client }) => { | |
const EMAIL = 'test@gmail.com'; | |
const PASSWORD = '123'; |
OlderNewer