With V8 from Jeroen Ooms, we can do things like use R totest this Javascript stats library simple-statistics from Tom McWright.
| #!/bin/bash | |
| # | |
| # Check a "few" things to help write more maintainable Go code. | |
| # | |
| # OK, it's fairly comprehensive. So simply remove or comment out | |
| # anything you don't want. | |
| # | |
| # Don't forget to install (go get) each of these tools. | |
| # More info at the URLs provided. | |
| # |
| import sqlite3 | |
| import os | |
| import argparse | |
| try: | |
| import pyspark | |
| import pyspark.sql | |
| except ImportError: | |
| import sys | |
| import os |
| // Placekittens http://www.houzz.com/photos/products | |
| // Example 1 | |
| var target = document.getElementsByClassName('shop-landing-top-promotions')[0]; | |
| target.innerHTML = '<img src="http://placekitten.com/g/800/120" alt="" />'; | |
| // Example 2 | |
| var target = document.getElementsByClassName('shop-landing-top-promotions')[0]; | |
| var targetInner = target.getElementsByClassName('shop-landing-top-promotions-content')[0]; | |
| targetInner.style.visibility='hidden'; | |
| target.style.background = 'url("http://placekitten.com/g/800/120") 0 0 repeat'; |
| #!/bin/bash | |
| branch_name=$(git symbolic-ref --short HEAD) | |
| if [ "$branch_name" == 'dev' ] || [ "$branch_name" == 'staging' ] | |
| then | |
| git commit --allow-empty -m 'empty commit to trigger deployment' | |
| fi |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
| module.exports = function(grunt){ | |
| grunt.initConfig({ | |
| // ... | |
| browserify: { | |
| specs: { | |
| src: ["web/specs/**/*Specs.js"], | |
| dest: "web/public/build/specs.js", | |
| options: { |
#Introduction
Developing Chrome Extensions is REALLY fun if you are a Front End engineer. If you, however, struggle with visualizing the architecture of an application, then developing a Chrome Extension is going to bite your butt multiple times due the amount of excessive components the extension works with. Here are some pointers in how to start, what problems I encounter and how to avoid them.
Note: I'm not covering chrome package apps, which although similar, work in a different way. I also won't cover the page options api neither the new brand event pages. What I explain covers most basic chrome applications and should be enough to get you started.
| # Usage: cas-get.sh {url} {username} {password} # If you have any errors try removing the redirects to get more information | |
| # The service to be called, and a url-encoded version (the url encoding isn't perfect, if you're encoding complex stuff you may wish to replace with a different method) | |
| DEST="$1" | |
| ENCODED_DEST=`echo "$DEST" | perl -p -e 's/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg' | sed 's/%2E/./g' | sed 's/%0A//g'` | |
| #IP Addresses or hostnames are fine here | |
| CAS_HOSTNAME=team.eea.sk | |
| #Authentication details. This script only supports username/password login, but curl can handle certificate login if required | |
| USERNAME=$2 |
| require.config({ | |
| baseUrl: '/backbone-tests/', | |
| paths: { | |
| 'jquery' : '/app/libs/jquery', | |
| 'underscore' : '/app/libs/underscore', | |
| 'backbone' : '/app/libs/backbone', | |
| 'mocha' : 'libs/mocha', | |
| 'chai' : 'libs/chai', | |
| 'chai-jquery' : 'libs/chai-jquery', | |
| 'models' : '/app/models' |