CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsI
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
import Vue from 'vue' | |
export default function({ store }, inject) { | |
Vue.directive('permission', { | |
inserted(el, binding, vnode) { | |
const { permission } = binding | |
const permissionList = store.state.auth.user.permission | |
if (permission && Array.isArray(permission) && permission.length > 0) { | |
const hasPermission = permissionList.some((role) => { |
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
export const isSameURL = (a, b) => a.split('?')[0] === b.split('?')[0] | |
export const isRelativeURL = u => | |
u && u.length && /^\/[a-zA-Z0-9@\-%_~][/a-zA-Z0-9@\-%_~]*[?]?([^#]*)#?([^#]*)$/.test(u) | |
export default function ({ app }) { | |
const redirect = function (name, noRouter = false) { | |
if (!this.options.redirect) { | |
return | |
} |
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
<script> | |
// vuejs with crypto-js - AES256 encrypt | decrypt api login | |
import CryptoJS from 'crypto-js' | |
import axios from 'axios' | |
import format from 'date-fns/format' | |
const key = '82f2ceed4c503896c8a291e560bd4325' // change to your key | |
const iv = 'sinasinasisinaaa' // change to your iv | |
const apiKey = '123xxxyyyzzz' // change to your api key | |
const username = 'chhumsina' |
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
<script> | |
import { Doughnut } from "vue-chartjs"; | |
import Chart from "chart.js"; | |
export default { | |
extends: Doughnut, | |
data: () => ({ | |
chartdata: { | |
labels: ["Cambodia", "Thailand", "Vietnam", "Laos"], | |
datasets: [ |
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
// Eslint + Prettier, custom configuration taken from here. | |
// https://medium.com/@doppelmutzi/eslint-prettier-vue-workflow-46a3cf54332f | |
// and here's my gist | |
// https://gist.github.com/robertoandres24/6cb6d0fa898bfb31066c5e1b118df64a | |
module.exports = { | |
root: true, | |
parserOptions: { | |
parser: 'babel-eslint' | |
}, | |
env: { |
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
import 'dart:async'; | |
import 'package:intl/intl.dart'; | |
class Contact { | |
static final DateFormat _formatter = DateFormat('MMMM d, yyyy'); | |
final String fullName; | |
final String gender; |
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
alert('hello'); |
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
<div id="itemlist"> | |
<div class="feed_item"> | |
<div class="feed_item_title"> | |
<a target="_blank" href="http://www.ezekhmer.com/2014/10/nouislider-sliding-range-of-beautiful.html">noUiSlider - beautiful of Sliding range style</a></div> | |
<div class="feed_item_description"> | |
noUiSlider is a range slider without bloat . It offers a ton off features , and it is as small, lightweight and minimal as possible, which is great... | |
</div> | |
<div class="feed_item_date">Oct 17, 2014 8:16:53 AM</div> | |
</div> | |
</div> |
NewerOlder