(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #include <FastLED.h> | |
| #define LED_PIN 3 | |
| #define NUM_LEDS 30 | |
| #define BRIGHTNESS 96 | |
| #define LED_TYPE WS2811 | |
| #define COLOR_ORDER GRB | |
| CRGB leds[NUM_LEDS]; | |
| #define UPDATES_PER_SECOND 100 |
| # Tries to connect to a running gpg-agent or starts one itself. It tries connecting to: | |
| # 1. the agent currently designated in the environment, | |
| # 2. the agent designated in the $HOME/.gnupg/gpg-agent-info file, | |
| # 3. the most recently started running gpg-agent process, or last | |
| # 4. a new gpg-agent process, with ssh support and, if applicable, x11 support. | |
| # | |
| # Step no. 3 requires the "pgrep" and "sockstat" utilities (available on FreeBSD) | |
| CONNECTGPG=$(which gpg-connect-agent) | |
| if [ -x $CONNECTGPG ] ; then |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Find it here: https://github.com/bitemyapp/learnhaskell
| " Vim color scheme | |
| " | |
| " Name: railscat.vim | |
| " Maintainer: Jeff Kreeftmeijer | |
| " License: public domain | |
| " | |
| " A GUI only extended version of the Railscasts+ theme, that comes with | |
| " Janus [1] and is, in turn, an extension to the original Railscasts theme | |
| " [2], which is a port of the RailsCasts TextMate theme [3] to Vim. | |
| " |
| set :rails_env, "production" | |
| set :passenger_port, 9292 | |
| set :passenger_cmd, "#{bundle_cmd} exec passenger" | |
| namespace :deploy do | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && #{passenger_cmd} start -e #{rails_env} -p #{passenger_port} -d" | |
| end | |
| task :stop, :roles => :app, :except => { :no_release => true } do |
| # | |
| # uncrustify config file for objective-c and objective-c++ | |
| # | |
| indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs | |
| output_tab_size = 4 # new tab size | |
| indent_columns = output_tab_size | |
| indent_label = 2 # pos: absolute col, neg: relative column | |
| indent_align_assign = FALSE |
| # In config/initializers/local_override.rb: | |
| require 'devise/strategies/authenticatable' | |
| module Devise | |
| module Strategies | |
| class LocalOverride < Authenticatable | |
| def valid? | |
| true | |
| end |
| #See: http://daringfireball.net/2010/07/improved_regex_for_matching_urls | |
| import re, urllib | |
| GRUBER_URLINTEXT_PAT = re.compile(ur'(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))') | |
| for line in urllib.urlopen("http://daringfireball.net/misc/2010/07/url-matching-regex-test-data.text"): | |
| print [ mgroups[0] for mgroups in GRUBER_URLINTEXT_PAT.findall(line) ] |