Skip to content

Instantly share code, notes, and snippets.

View Mozartted's full-sized avatar
💭
building stuff

Chibuike Osita Mozartted

💭
building stuff
View GitHub Profile
function isHidden(el) {
return (el.offsetParent === null)
}
function async applyCoupon (coupon) {
// async or return promise
var response = {}; // refer the format below
document.querySelector(".deals-and-discounts-toggle > button").click();
setTimeout(() => {
function isHidden(el) {
return (el.offsetParent === null)
}
function async applyCoupon (coupon) {
// async or return promise
var response = {}; // refer the format below
document.querySelector(".deals-and-discounts-toggle > button").click();
setTimeout(() => {
function isHidden(el) {
return (el.offsetParent === null)
}
function async applyCoupon (coupon) {
// async or return promise
var response = {}; // refer the format below
document.querySelector(".deals-and-discounts-toggle > button").click();
setTimeout(() => {
@Mozartted
Mozartted / hero.ts
Created April 20, 2019 11:03 — forked from brennanMKE/hero.ts
Example of Mongoose with TypeScript and MongoDb
import * as mongoose from 'mongoose';
export let Schema = mongoose.Schema;
export let ObjectId = mongoose.Schema.Types.ObjectId;
export let Mixed = mongoose.Schema.Types.Mixed;
export interface IHeroModel extends mongoose.Document {
name: string;
power: string;
@Mozartted
Mozartted / .gitlab-ci.yml
Last active October 20, 2017 18:49
Gitlab continuous integrations configs for Laravel App Deployment
stages:
- test
- deploy
# So this is where I deploy to server to build the site
deploy-master:
stage: deploy
image: tetraweb/php:7.0
@Mozartted
Mozartted / NoteEditor.vue
Created August 31, 2017 14:10
Extended Note Editor
<template>
<div class="col-md-9 nopadding">
<div class="col-md-12">
<input class="top-input" type="" name="" :value="note.title" v-model="note.title">
</div>
<textarea class="main-text" v-model="note.content" >
</textarea>
</div>
</template>
<script>
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Laravel\Passport\Passport;
use Carbon\Carbon;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
@Mozartted
Mozartted / user.php
Created August 31, 2017 12:22
User Model
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Laravel\Passport\HasApiTokens;
class User extends Authenticatable
{
@Mozartted
Mozartted / NoteSidebar.vue
Created August 31, 2017 11:12
New NoteSidebar axios enhanced
<template>
<div class="col-md-3 nopadding">
<div class="note-container">
<div class="note-title">Real Notes</div>
<div class="notes-items" v-for="(note,index) in notes" @click="selectNotes(note)">
<h5 class="font-fa">{{note.title}}</h5>
<span @click="remove(note,index)">click to remove</span>
</div>
<div class="add-note" @click="createNote">New Note?</div>
</div>
@Mozartted
Mozartted / NoteApp.vue
Created August 31, 2017 10:51
The Axios enhananced
<template>
<div class="col-md-12 contain nopadding">
<note-sidebar v-if="notes" :initialnotes="notes" @noteChosen="noteSelected"></note-sidebar>
<note-editor v-if="firstNote" :note="firstNote"/>
</div>
</template>
<script>
import NoteEditor from './NoteEditor.vue';
import NoteSidebar from './NoteSidebar';