This file contains hidden or 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
| class Mother < User | |
| default_scope {where('users.role': :mother)} | |
| belongs_to :property, class_name: 'MotherProperty', foreign_key: :user_id | |
| end |
This file contains hidden or 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
| # api/v1/endpoints/registration_endpoint.rb | |
| class RegistrationEndpoint < Grape::API | |
| desc 'Create user, or register new user' | |
| params do | |
| requires :role, type: String | |
| optional :username, type: String | |
| optional :email, type: String |
This file contains hidden or 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
| // Untuk collection disesuaikan antara comics_id, comics_en, atau comics_contest | |
| // sebaiknya dieksekusi sebelum jumlah like banyak (estimasi 1000) | |
| // takutnya kehabisan memory | |
| // @referensi: https://stackoverflow.com/questions/36164746/mongo-convert-embedded-document-to-array | |
| db.books.aggregate([ | |
| {"$unwind": "$sections"}, | |
| {"$match": { | |
| "sections.likes": { | |
| $exists: true, |
This file contains hidden or 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
| { | |
| "users": { | |
| "0": "fathur", | |
| "1": "sandy", | |
| "2": "mizan", | |
| "3": "jojo", | |
| "4": "windi" | |
| } | |
| } |
This file contains hidden or 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
| { | |
| "users": [ | |
| "fathur", | |
| "sandy", | |
| "mizan", | |
| "jojo", | |
| "windi" | |
| ] | |
| } |
This file contains hidden or 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
| { | |
| "user": { | |
| "email": "fathur@rohman.com", | |
| "username": "fathur", | |
| "password": "fgnsi9eg0ndsug007w70tw0e70e70w5g0w9gifg" | |
| } | |
| } |
This file contains hidden or 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
| phpbrew install 7.0.16 +default +dbs +bz2 +calendar +cgi +cli +ctype +dba +debug +dom +embed +exif +fileinfo +filter +fpm +ftp +gd +gettext +hash +imap +intl +ipc +ipv6 +json +kerberos +mbregex +mbstring +mcrypt +mhash +mysql +openssl +pcre +pdo +pgsql=/usr/lib/postgresql/9.5/bin +phar +posix +readline +session +soap +sockets +tokenizer +xml_all +xmlrpc +zip +zlib |
This file contains hidden or 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
| 'use strict'; | |
| var argv = require('minimist')(process.argv.slice(2)) | |
| , gulp = require('gulp') | |
| , cache = require('gulp-cache') | |
| , watch = require('gulp-watch') | |
| , gutil = require('gulp-util') | |
| , gulpif = require('gulp-if') | |
| , gulpifelse = require('gulp-if-else') | |
| , sass = require('gulp-sass') | |
| , livereload = require('gulp-livereload') |
This file contains hidden or 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
| <?php | |
| /** | |
| * Define a class Home | |
| * | |
| **/ | |
| class Home | |
| { | |
| // Static property for property door and window. | |
| // This property should be statically defined, |
This file contains hidden or 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
| <?php | |
| use Carbon\Carbon; | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Database\Migrations\Migration; | |
| class SnortBarnyardTables extends Migration | |
| { | |
| /** | |
| * Run the migrations. |