Skip to content

Instantly share code, notes, and snippets.

import unittest
def compare_func(a, b):
return a == b
class TestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
@itswindtw
itswindtw / Vue-cli-3-Phoenix-1.3-HOWTO.md
Last active September 4, 2018 20:15 — forked from jpbecotte/Vue-cli-3-Phoenix-1.3-HOWTO.md
Vue-cli 3, Phoenix 1.3, a complete how-to

Introduction

I have been struggling to start a new project with Phoenix 1.3 and the new vue-cli 3 for Vue.js. There are tons of example already but none of them suited my needs, because:

  • I want to use the new Vue-cli to select the features that I want,
  • I do NOT want to setup Webpack (I know, what a shame!). The new Vue-cli includes the new vue-cli-service, which uses an instance of webpack-dev-server, so you don't have to import it manually in your project.
  • I do not want to use Brunch.

Create your Phoenix App

Assuming that you have Elixir and Phoenix 1.3 are both installed, let's build our new App.

@itswindtw
itswindtw / test.html
Last active May 7, 2016 06:03
weird behavior in Chrome 50 (Windows only)
<html>
<head>
</head>
<body>
<script>
var test = function (str) {
with(Math) { // whatever
var scalar = parseFloat(str);
var unit = str.replace(/-?\d+(\.\d*)?/g, "");