Skip to content

Instantly share code, notes, and snippets.

View znck's full-sized avatar
🎯
Focusing

Rahul Kadyan znck

🎯
Focusing
View GitHub Profile
import { mount } from 'vue-test-utils'
import { createRenderer } from 'vue-server-renderer'
import MyComponent from './MyComponent.vue'
const renderer = createRenderer()
renderer.renderToString(
mount(MyComponent).vm,
(error, html) => {
@znck
znck / Hello.vue
Last active October 29, 2017 14:16
vue component compiler source map issue
<template>
<h2 class="red">{{msg}}</h2>
</template>
<script>
export default {
data () {
return {
msg: 'Hello from Component A!'
}
@znck
znck / aliasthat.sh
Created June 13, 2017 07:23
Create an alias for last command.
function aliasthat {
if [ -n ${1} ]; then
fc -e "sed -i -e \"s/^.*/echo alias $1=\\\"'\\\"\'&\'\\\"'\\\" >> ~\/.bash_alias/\""
. ~/.bash_alias
fi
}
@znck
znck / index.html
Last active July 14, 2017 19:55
jquery demo: JS Bin// source https://jsbin.com/meximo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.group {
display: block;
margin: 0 15px 15px;
@znck
znck / webpack.config.js
Created June 9, 2017 19:46
Webpack Chunks
// ----- Extracting Chunks -----
exports.entry['vendor/vue'] = ['vue', 'vuex', 'vue-resource', 'vue-router']
exports.entry['vendor/bootstrap'] = ['jquery', 'bootstrap', 'tether']
exports.entry['vendor/components'] = ['bootstrap-for-vue']
exports.entry['vendor/plugins'] = ['moment', 'sifter']
exports.entry['vendor/echo'] = ['pusher-js', 'laravel-echo', 'echo-for-vue']
exports.plugins.push(
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest'
}),

Keybase proof

I hereby claim:

  • I am znck on github.
  • I am znck (https://keybase.io/znck) on keybase.
  • I have a public key whose fingerprint is 4960 41D2 4381 8206 D62C C2DF 21AF 5D4A 08BA 995B

To claim this, I am signing this object:

@znck
znck / state-of-vue-compilers.md
Last active April 11, 2017 21:41
Feature Comparison - vue-loader vs vueify vs rollup-plugin-vue
Feature vue-loader vueify rollup-plugin-vue
Support for Vue 1.x Version 8.x Version 8.x Version 2.x
Support for Vue 2.0 Version 9.0+ Version 9.0+ Version 2.x
ES2015 With buble-loader or babel-loader Preconfigured to use babel With rollup-plugin-buble or rollup-plugin-babel
Scoped CSS -
CSS Modules -
PostCSS -
Hot Reload &check; &check;
@znck
znck / -
Created September 1, 2015 17:05
{
"_id": "55c191fc9f9553312368df1e",
"location": [
13.0063555,
80.25238880000006
],
"name": "Prems Graama Bhojanam",
"phone": "9840062772",
"image": "http://s3-ap-southeast-1.amazonaws.com/clozerr/app/coupons-alpha/",
"fid": "5161203245370561",
@znck
znck / -
Created September 1, 2015 17:04
{
"_id": "55c191fc9f9553312368df1e",
"location": [
13.0063555,
80.25238880000006
],
"name": "Prems Graama Bhojanam",
"phone": "9840062772",
"image": "http://s3-ap-southeast-1.amazonaws.com/clozerr/app/coupons-alpha/",
"fid": "5161203245370561",
@znck
znck / setproxy.py
Created February 15, 2015 15:27
Ubuntu Proxy Settings
#! /bin/sh
""":"
exec python $0 ${1+"$@"}
"""
import sys
import re
import fileinput
if len(sys.argv) != 5 and len(sys.argv) != 3:
print "Wrong command, sample commands: \n python setproxy.py 202.141.80.19 3128 username password \n OR \n python setproxy.py 202.141.80.19 3128"