- Go to System Preferences -> Keyboard -> Modifier Keys...
- Change “Caps Lock” to “No action”
- Install Seil
- Change the Caps Lock key in Seil to keyCode 80 (F19)
- Install Karabiner
- Open Karabiner and go to Misc & Uninstall -> Open private.xml
- Copy the contents of this gist's example to the XML file and save
- In Karabiner, go to Change Keys -> Reload XML
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build_web: |
import React, { Component } from 'react'; | |
export default function withPropsChecker(WrappedComponent) { | |
return class PropsChecker extends Component { | |
componentWillReceiveProps(nextProps) { | |
Object.keys(nextProps) | |
.filter(key => { | |
return nextProps[key] !== this.props[key]; | |
}) | |
.map(key => { |
I don't know about other developers -- but one of the most frustrating things in my mind to get going when starting a new hybrid application is session/authorization management. Do you use OAuth 1, OAuth 2, generic email login, facebook...even thinking about it stresses me out. Unfortunately, no good hybrid (or mobile for that matter) application can escape the need for good authorization (unless it is a stateless app, like a calculator, or something easy).
Personally -- I have come to love the OAuth 2 standard for its simplicity, and standards of operation. It takes some of the stress out of the decision making process when coming up with how to manage application state flow -- something which is especially necessary in [most] mobile (or native) applications. This article is going to focus on one of those pain points -- hybrid mobile app state management, and how to solve it with regards to the marriage of AngularJS & Ion
WebFontConfig = { | |
google: { families: [ 'PT+Sans:400,400italic:latin', 'Ubuntu:300,400,500:latin' ] } | |
}; | |
var cb = function() { | |
var wf = document.createElement('script'); | |
wf.src = '//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; | |
wf.type = 'text/javascript'; | |
wf.async = 'true'; | |
var s = document.getElementsByTagName('script')[0]; |
<?php | |
/** | |
* Template Name: ajax | |
*/ | |
?> | |
<?php | |
$post = get_post($_GET['id']); | |
?> | |
<?php if ($post) : ?> | |
<?php setup_postdata($post); ?> |
http://wordpress.org/support/topic/how-to-add-four-wp-queries-without-duplicate-posts | |
query for loop1 | |
loop1: | |
$do_not_duplicate[] = $post->ID; | |
end loop1; | |
query for loop2 including 'post__not_in => $do_not_duplicate' | |
loop2: | |
$do_not_duplicate[] = $post->ID; |
#!/bin/bash | |
if [ "$1" == "" ]; then | |
echo Usage: $0 pngfile | |
exit 0; | |
fi | |
FILE=`basename $1 .png` | |
if [ ! -e $FILE.png ]; then |
import sublime | |
import sublime_plugin | |
import re | |
class CompactExpandCssCommand(sublime_plugin.TextCommand): | |
def run(self, edit, action='compact'): | |
rule_starts = self.view.find_all('\{') | |
rule_ends = self.view.find_all('\}') |