Note: I'm currently taking a break from this course to focus on my studies so I can finally graduate
| 'use strict'; | |
| module.exports = function(grunt) { | |
| // load all grunt tasks | |
| require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
| // configurable paths | |
| var paths = { |
| // 1. Go to page https://www.linkedin.com/settings/email-frequency | |
| // 2. You may need to login | |
| // 3. Open JS console | |
| // ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers)) | |
| // 4. Copy the following code in and execute | |
| // 5. No more emails | |
| // | |
| // Bookmarklet version: | |
| // http://chengyin.github.io/linkedin-unsubscribed/ |
Updated for Rails 4.0.0+
-
Set up the
bowergem. -
Follow the Bower instructions and list your dependencies in your
bower.json, e.g.// bower.json
{
| #!/usr/bin/env ruby | |
| def get_values(string, expression) | |
| regex = Regexp.new(expression.gsub(/\{([^\}]+)\}/) { "(?<#{$1}>\\S+)" }) | |
| (match = regex.match(string)) ? Hash[match.names.zip(match.captures)] : {} | |
| end | |
| p get_values "Alice is 23 years old", "{name} is {age} years old" #=> {"name"=>"Alice", "age"=>"23"} |
| # encoding: binary | |
| # Removes any bytes from a string that are not valid UTF-8 | |
| class Cleaner | |
| attr_reader :bytes, :buffer, :outstanding | |
| def self.clean(str) | |
| new.tap { |c| c << str }.to_s | |
| end |
Ember.js – for the unaware – is an application framework for building sophisticated browser applications. I'm a frequent contributor to the project and use it professionally at my current gig with Groupon Engineering. This piece is part tutorial, part marketing pitch.
There's currently a lot of interest in Ember and its browser-application-crafting siblings as people are becoming more comfortable with browser as a legitimate application development platform and not merely a
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| #!/usr/bin/env ruby | |
| # coding: utf-8 | |
| require 'sinatra' | |
| set :server, 'thin' | |
| set :sessions, true | |
| streams = Hash.new {|k, v| k[v] = [] } | |
| helpers do | |
| def session_id |
| if Rails.env.development? | |
| Rails.application.assets.logger = Logger.new('/dev/null') | |
| Rails::Rack::Logger.class_eval do | |
| def call_with_quiet_assets(env) | |
| previous_level = Rails.logger.level | |
| Rails.logger.level = Logger::ERROR if env['PATH_INFO'] =~ %r{^/assets/} | |
| call_without_quiet_assets(env) | |
| ensure |