| # requires: 256 color terminal | |
| /script install iset.pl | |
| /script install buffers.pl | |
| /script install colorize_nicks.py | |
| /set weechat.look.buffer_notify_default message | |
| /set weechat.look.color_nick_offline on | |
| /set weechat.look.prefix_action " •" | |
| /set weechat.look.prefix_join "▬▶" |
| 'use strict'; | |
| import {Router5, RouteNode} from 'router5'; | |
| import logger from '../logger'; | |
| // The set of valid sink functions includes synchronous state-affecting router functions that do not require a callback | |
| // and which do not have a significant return value other than the router object itself. | |
| const validSinkFuncs = ['add','addNode','canActivate','deregisterComponent','navigate','registerComponent','setOption','start','stop']; | |
| function validateAndRemapSinkArgument(arg) { |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
| // String utils | |
| // | |
| // resources: | |
| // -- mout, https://github.com/mout/mout/tree/master/src/string | |
| /** | |
| * "Safer" String.toLowerCase() | |
| */ | |
| function lowerCase(str) { | |
| return str.toLowerCase(); |
Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.
If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.
(rough-cut for Backbone Fundamentals)
As we learned earlier in the book, the validate method on a Model is called before set and save, and is passed the model attributes updated with the values from these methods.
By default, where we define a custom validate method, Backbone passes all of a Model's attributes through this validation each time, regardless of which model attributes are being set.
This means that it can be a challenge to determine which specific fields are being set or validated without being concerned about the others that aren't being set at the same time.
Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.
As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.
Here's how to get it set up on Mac OS X:
-
OpenConnect can be installed via homebrew:
brew update
brew install openconnect
| #!/bin/bash -ex | |
| # Paste this into ssh | |
| # curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex | |
| # When forking, you can get the URL from the raw (<>) button. | |
| ### Set some command variables depending on whether we are root or not ### | |
| # This assumes you use a debian derivate, replace with yum, pacman etc. | |
| aptget='sudo apt-get' | |
| chsh='sudo chsh' |