Skip to content

Instantly share code, notes, and snippets.

View CryDeTaan's full-sized avatar
🏠
Working from home

CryDeTaan

🏠
Working from home
View GitHub Profile
char_count = 1
check_chars = ""
while char_count < 254:
#new line, carriage return
if char_count not in [10, 13]:
check_chars += chr(char_count)
char_count +=1
# Write to disk for !mona compare.
@CryDeTaan
CryDeTaan / package.json
Last active December 11, 2019 03:53
Gist for medium post
{
"private": true,
"scripts": {
"... SNIP ...": "Removed for purposes of example"
},
"devDependencies": {
"... SNIP ...": "Removed for purposes of example",
"vue-router": "^3.1.3"
},
"dependencies": {
@CryDeTaan
CryDeTaan / app.scss
Created October 7, 2019 04:11
Gist for medium post
// Fonts
@import url('https://fonts.googleapis.com/css?family=Nunito');
// Font Awesome
@import '~@fortawesome/fontawesome-free/scss/brands';
@import '~@fortawesome/fontawesome-free/scss/regular';
@import '~@fortawesome/fontawesome-free/scss/solid';
@import '~@fortawesome/fontawesome-free/scss/fontawesome';
// Variables
@CryDeTaan
CryDeTaan / bootstrap.js
Last active October 7, 2019 04:21
Gist for medium post
/* ... SNIP ... */
try {
window.Popper = require('popper.js').default;
window.$ = window.jQuery = require('jquery');
require('bootstrap');
require('admin-lte'); // Include AdminLTE
} catch (e) {}
@CryDeTaan
CryDeTaan / app.js
Created October 7, 2019 05:46
Gist for medium post
/* ... SNIP ... */
require('./bootstrap');
// 1. Comment out this following line:
// window.Vue = require('vue');
// 2. Add below the above commented-out line:
import Vue from 'vue';
import VueRouter from "vue-router";
@CryDeTaan
CryDeTaan / bootstrap.js
Created October 7, 2019 11:14
Gist for medium post
/* ... SNIP ... */
// Commnet out the line
//window.axios = require('axios');
// Add the ES2015 formation
import axios from 'axios';
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
@CryDeTaan
CryDeTaan / web.php
Created October 7, 2019 17:53
Gist for Medium post
<?php
/* ... SNIP ... */
Route::get('/admin/', function () {
if (Auth::check()) {
return view('admin');
}
return redirect('/login');
@CryDeTaan
CryDeTaan / webpack.mix.js
Created October 7, 2019 17:58
Gist for medium post
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css') // Remove the ';'
.copy('resources/assets/images', 'public/images'); // This should be added.
@CryDeTaan
CryDeTaan / sidebar.blade.php
Last active October 8, 2019 06:11
Gist for medium post
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
<!-- Add icons to the links using the .nav-icon class
with font-awesome or any other icon font library -->
<li class="nav-item">
<router-link tag="a" to="/dashboard" class="nav-link">
<i class="nav-icon fas fa-tachometer-alt"></i>
@CryDeTaan
CryDeTaan / routes.js
Created October 8, 2019 05:42
Gist for medium
let routes = [
{
path: '/dashboard',
component: require('./views/dashboard').default
},
{
path: '/users',
component: require('./views/users').default
},
{