Skip to content

Instantly share code, notes, and snippets.

View smolinari's full-sized avatar
😜
What the heck do you think my status is?

Scott smolinari

😜
What the heck do you think my status is?
View GitHub Profile
$ PACKER_LOG=1 packer build -debug builder.json | build.txt
bash: build.txt: command not found
2016/02/22 19:52:54 [INFO] Packer version: 0.9.0 a643faae672ec8b8424352476d2b91b7a7f7b06e
2016/02/22 19:52:54 Packer Target OS/Arch: windows amd64
2016/02/22 19:52:54 Built with Go Version: go1.6
2016/02/22 19:52:54 [DEBUG] Discovered plugin: amazon-chroot = C:\packer\packer-builder-amazon-chroot.exe
2016/02/22 19:52:54 [DEBUG] Discovered plugin: amazon-ebs = C:\packer\packer-builder-amazon-ebs.exe
2016/02/22 19:52:54 [DEBUG] Discovered plugin: amazon-instance = C:\packer\packer-builder-amazon-instance.exe
2016/02/22 19:52:54 [DEBUG] Discovered plugin: digitalocean = C:\packer\packer-builder-digitalocean.exe
2016/02/22 19:52:54 [DEBUG] Discovered plugin: docker = C:\packer\packer-builder-docker.exe
$ PACKER_LOG=1 packer build -debug builder.json
2016/02/22 21:27:33 [INFO] Packer version: 0.9.0 a643faae672ec8b8424352476d2b91b7a7f7b06e
2016/02/22 21:27:33 Packer Target OS/Arch: windows amd64
2016/02/22 21:27:33 Built with Go Version: go1.6
2016/02/22 21:27:33 Using internal plugin for digitalocean
2016/02/22 21:27:33 Using internal plugin for file
2016/02/22 21:27:33 Using internal plugin for parallels-iso
2016/02/22 21:27:33 Using internal plugin for parallels-pvm
2016/02/22 21:27:33 Using internal plugin for vmware-vmx
2016/02/22 21:27:33 Using internal plugin for amazon-instance
@smolinari
smolinari / gist:609335f498c456bd97c3ff86ad6136db
Last active September 22, 2016 06:28
Example ODB Cluster to Shard Code Change
/*
*
* * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com)
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
@smolinari
smolinari / VueIsBetterThanReact.js
Last active January 27, 2017 06:48
Why (I think) Vue is better than React
// Reason 1 - Vue is more pragmatic
// Reason 2 - Code using Vue ends up more elegant
// Reason 3 - Vue performs better in most cases
// Reason 4 - Vue is smaller, yet covers practically everything React does
// Reason 5 - Vue is easier to reason about or rather JSX is harder to reason about
// Reason 6 - JSX is for JS experts, Vue speaks to a much larger crowd i.e. beginners and intermediates
// Reason 6.1 - Vue is easier to learn
// Reason 7 - Vue's templating system allows for better static analysis
// Reason 8 - If you must do JSX, Vue can do it too
// Reason 9 - JSX with React isn't necessary, but ugh, then it gets even uglier
@smolinari
smolinari / gist:fba3d3092cacae628eabfce6fd02a29f
Created January 5, 2018 13:32
A context menu in VueJS/ Quasar Framework
<template>
<div class="layout-padding row justify-center">
<div style="width: 500px; max-width: 90vw;">
<p class="caption">
<span class="desktop-only">
Right click on the colored area below.
<br>
On a real mobile device it works different by opening a minimized Modal triggered by a long tap.
</span>
<span class="mobile-only">
@smolinari
smolinari / Index.vue
Last active October 2, 2018 06:50
Index.vue
<template>
<q-page class="flex flex-center">
<div>
<q-btn @click="log" label="Log Stuff"></q-btn>
</div>
</q-page>
</template>
<script>
export default {
@smolinari
smolinari / apollo.js
Created October 4, 2018 14:09
The plugin file for Quasar and Vue-Apollo
import { ApolloClient } from 'apollo-client'
import { InMemoryCache } from 'apollo-cache-inmemory'
import VueApollo from 'vue-apollo'
import fetch from 'node-fetch'
import { createHttpLink } from 'apollo-link-http'
const httpLink = createHttpLink({ uri: 'http://localhost:4000/graphql', fetch: fetch })
// Create the apollo client
const apolloClient = new ApolloClient({
λ yarn build
yarn run v1.13.0
$ node build/script.build.js
💥 Cleaned build artifacts.
📦 Building Quasar v1.0.0-beta.1... [multi-threaded]
[json] dist\api\QBadge.json 1.21kb
[json] dist\api\QAjaxBar.json 1.73kb
<template lang="pug">
div.component(ref="el" :style="{ filter: `saturate(${saturation}) brightness(${brightness})` }")
div
div Brightness: {{brightness}}
div Saturation: {{saturation}}
div Width: {{width}}
div Height: {{height}}
div X: {{x}}
div Y: {{y}}
</template>
<template>
<q-virtual-scroll
style="max-height: 300px;"
:items="heavyList"
separator
>
<template v-slot="{ item, index }">
<q-item
:key="index"
dense