How to filter emails from GitHub in Gmail and flag them with labels.
The labels in this document are just examples.
Filter | Label |
---|
define [ | |
'jquery', | |
'underscore', | |
'backbone', | |
'backbone-pageable' | |
], ($, _, Backbone) -> | |
### | |
An extension of Backbone.PageableCollection to parse server responses created by Django Rest Framework. | |
The response structure is expected to match that provided by django-rest-framework's Pagination mechanism |
CREATE AGGREGATE array_accum (anyarray) | |
( | |
sfunc = array_cat, | |
stype = anyarray, | |
initcond = '{}' | |
); |
<% flash.each do |type, message| %> | |
<div class="alert <%= bootstrap_class_for(type) %> fade in"> | |
<button class="close" data-dismiss="alert">×</button> | |
<%= message %> | |
</div> | |
<% end %> |
logger = Logger.new(File.join( Rails.root, "log", "my_#{ Rails.env}.log"), 'daily') | |
logger.level = Logger::INFO | |
logger.formatter = proc do |severity, datetime, progname, msg| | |
"#{datetime.strftime("%B %d %H:%M:%S")} #{Socket.gethostname}, [#{$$}]:, #{severity} MY_WEBAPP, #{msg}\n" | |
end | |
tag_log = ActiveSupport::TaggedLogging.new(logger) | |
config.logger = tag_log | |
# above code will produce log in format as shown below, |
This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)
Sister Document - Restore MySQL from Amazon S3 - read that next
this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc
""" | |
Capture contents of block into context | |
-------------------------------------- | |
Use case: variable accessing based on current variable values. | |
{% capture foo %}{{ foo.value }}-suffix{% endcapture %} | |
{% if foo in bar %}{% endif %} | |
Created on Monday, February 2012 by Yuji Tomita |
<?php | |
class Bootstrap_Walker_Nav_Menu extends Walker_Nav_Menu { | |
function start_lvl( &$output, $depth ) { | |
//In a child UL, add the 'dropdown-menu' class | |
$indent = str_repeat( "\t", $depth ); | |
$output .= "\n$indent<ul class=\"dropdown-menu\">\n"; |
%h1&= title | |
%p Hello world |
require 'spec_helper' | |
describe Users::OauthCallbacksController, "handle facebook authentication callback" do | |
describe "#annonymous user" do | |
context "when facebook email doesn't exist in the system" do | |
before(:each) do | |
stub_env_for_omniauth | |
get :facebook |