-- put this file somewhere in your nvim config, like: ~/.config/nvim/lua/config/lua-lsp.lua | |
-- usage: require'lspconfig'.sumneko_lua.setup(require("config.lua-lsp")) | |
local library = {} | |
local path = vim.split(package.path, ";") | |
-- this is the ONLY correct way to setup your path | |
table.insert(path, "lua/?.lua") | |
table.insert(path, "lua/?/init.lua") |
import produce from 'immer'; | |
import {createStore} from 'redux'; | |
const handleActions = (actionsMap, defaultState) => ( | |
state = defaultState, | |
{type, payload} | |
) => | |
produce(state, draft => { | |
const action = actionsMap[type]; | |
action && action(draft, payload); |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
The advantages of using Grunt with Cordova:
- It simplifies working with the cordova cli.
- It provides a mechanism to copy platform customization to the
platforms
directory without having to commit the generatedplugins
andplatforms
directories to version control. - It provides a way to watch resources and automatically run cordova commands.
Stack Overflow: .gitignore for PhoneGap/Cordova 3.0 projects - what should I commit?
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
-
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>
- Team Dashboard - http://fdietz.github.io/team_dashboard/
- Geckoboard - http://www.geckoboard.com/ - Slick data dashboards.
- Leftronic - https://www.leftronic.com/ - Similar, doesn't seem quite as organised looking
- Dashing - http://shopify.github.io/dashing/ - Simple metric dashboards by Shopify. Widget list
- HighCharts - http://www.highcharts.com/ Not very inspiring but very widely used & performant
- Google Charts - https://developers.google.com/chart/ Again, not very inspiring but can be customised
- Flot - http://www.flotcharts.org/ Gorgeous slick HTML5 graphs