Skip to content

Instantly share code, notes, and snippets.

View Phunky's full-sized avatar

Mark Harwood Phunky

View GitHub Profile
@Phunky
Phunky / ext
Created March 29, 2019 12:02
vscode
EditorConfig.editorconfig-0.12.4
PeterJausovec.vscode-docker-0.0.27
Shan.code-settings-sync-2.9.2
Zignd.html-css-class-completion-1.17.1
aws-scripting-guy.cform-0.0.10
christian-kohler.npm-intellisense-1.3.0
christian-kohler.path-intellisense-1.4.2
dzannotti.vscode-babel-coloring-0.0.4
junstyle.php-cs-fixer-0.1.80
kevinkyang.auto-comment-blocks-1.0.1
@Phunky
Phunky / http.js
Created January 22, 2018 16:45
Example axios wrapping I used for my own APIs
import axios from 'axios'
import store from '../store'
// Instance
let http = axios.create({
baseURL: process.env.API_URL,
timeout: process.env.API_TIMEOUT,
headers: {
}
})
@Phunky
Phunky / example.styl
Last active January 10, 2017 09:06
How I use colours within stylus
// Quick example of how to use it
.warning {
color red
background-color mobilleo
}
// But it has sensible fallbacks to the default prop usage if colour is not found or is a valid colour
.alert {
color #9c0
<template lang="pug">
div(v-bem)
input.input(
:name='name',
:placeholder='placeholder',
v-model='input',
@focus="focus"
@blur="reset"
@keydown='query | debounce 100'
@keydown.down.prevent.stop="selection"
<template lang="pug">
figure(v-bem, :modifiers="modifiers", :style="{width:width + 'px', height:height + 'px'}")
img( :src="url", :alt='alt', :style="{width:width + 'px', height:height + 'px'}")
</template>
<script>
export default {
props: {
src: {
type: String,
; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments. They are not executed.
; This script has a special filename and path because it is automatically
; launched when you run the program directly. Also, any text file whose
; name ends in .ahk is associated with the program, which means that it
; can be launched simply by double-clicking it. You can have as many .ahk
; files as you want, located in any folder. You can also run more than
; one ahk file simultaneously and each will get its own tray icon.
<template>
<div class="chatter">
<div class="controls">
<input type="text" placeholder="Your message..." v-model="message" @keyup.enter="userMessage"/>
<button @click="userMessage">Send</button>
</div>
<div class="messages">
<div class="message" v-for="message in messages">
<p>{{ timestamp() }} <strong>{{ message.sender }}</strong>: {{ message.text }}</p>
</div>
@Phunky
Phunky / package.json
Created March 10, 2016 00:40
Webpack configs for building my VueJS packages
{
"name": "vue-modal",
"version": "0.0.1",
"description": "Simple modal component",
"main": "dist/vue-modal.js",
"scripts": {
"example": "webpack-dev-server --inline --hot --config build/webpack.example.js --content-base example/",
"dist": "webpack -p --config build/webpack.dist.js"
},
"keywords": [
! function(t) {
function e(r) {
if (s[r]) return s[r].exports;
var i = s[r] = {
exports: {},
id: r,
loaded: !1
};
return t[r].call(i.exports, i, i.exports, e), i.loaded = !0, i.exports
}
import svg from 'vue-svg-directive'
import sidebar from './v-sidebar.vue'
import items from './v-sidebar-items.vue'
import item from './v-sidebar-item.vue'
export default {
install (Vue, opts) {
Vue.use(svg, {
sprites : opts.sprites,
prefix : opts.prefix,