Testing comes in many flavors depending on what you're specifically trying to test and how it accumulates in the tech stack:
- Unit Testing
- Integration Testing
export default function Plugin(Vue) { | |
/** | |
Installing in your app root: | |
import DarkMode from './path/to/this/code.js'; | |
Vue.use(DarkMode); | |
Usage in your components: | |
<div v-if="$darkMode.isDark">...</div> |
// vue.config.js | |
module.exports = { | |
configureWebpack: { | |
watch: true | |
} | |
} |
var Benchmark = require('benchmark'); | |
Benchmark.prototype.setup = function() { | |
a = ["test"]; | |
for (var i = 0; i < 10000; i++) { | |
a.push("some other stuff"); | |
} | |
s = a.join(); | |
re1 = new RegExp("^test"); | |
re2 = new RegExp("^not there"); | |
}; |
An angular module to report on bootstrap's reponsive grid breakpoints. The injected html snipped uses bootstrap's named breakpoints so your script doesn't need to know anything about the actual css dimensions.
ScreenSize
as a dependency of your appScreenSizeFactory
in your controler's DI list> typeof([]) | |
'object' | |
> typeof({a:[]}.a) | |
'object' | |
> [] | |
[] | |
> typeof(['hi']) | |
'object' | |
> var hello = ['hi'] | |
undefined |
# A tiny Jekyll filter for giving custom dates a proper timezone offset | |
# example usage `{{ post.startDate | tz_local | date: '%l:%M %P'}}` | |
# Why? If you omit a timezone offset, Jekyll automatically adds +0000...which is probably not what you want. | |
# This let's dates like `startDate: 2015-1-14 18:00:00` render correcty in local time. DST is calculated correctly | |
# NOTE: This will still inherit Jekyll's timezone property as set in _config.yml | |
module TZLocal | |
def tz_local(input) | |
input = input + (Time.parse(input.to_s).gmt_offset) * -1 | |
end |
#welcome to class | |
#goals for today | |
* learn about deckdown | |
* ??? | |
* profit | |
##Corgis are awesome |