How to filter emails from GitHub in Gmail and flag them with labels.
The labels in this document are just examples.
Filter | Label |
---|
/* Mobile */ | |
@media only screen and (max-width: 767px) { | |
[class*="mobile hidden"], | |
[class*="tablet only"]:not(.mobile), | |
[class*="computer only"]:not(.mobile), | |
[class*="large screen only"]:not(.mobile), | |
[class*="widescreen only"]:not(.mobile), | |
[class*="or lower hidden"] { | |
display: none !important; | |
} |
The standard names for indexes in PostgreSQL are:
{tablename}_{columnname(s)}_{suffix}
where the suffix is one of the following:
pkey
for a Primary Key constraint;key
for a Unique constraint;excl
for an Exclusion constraint;idx
for any other kind of index;
# Without this fix, downgrading from Rails 4 to Rails 3 causes session cookies to blow up. | |
# | |
# The way the flash is stored in the session changed in a backwards-incompatible way. | |
if Rails::VERSION::MAJOR == 3 | |
module ActionDispatch | |
class Flash | |
def call(env) | |
if (session = env['rack.session']) && (flash = session['flash']) |
class MetalController < ActionController::Metal | |
include AbstractController::Rendering | |
include ActionView::Layouts | |
include ActionController::Serialization | |
include ActionController::Rendering | |
include ActionController::Renderers::All | |
include ActionController::Redirecting | |
include AbstractController::Callbacks | |
include AbstractController::Helpers | |
include ActionController::ParamsWrapper |
module Bus where | |
import Data.List (find, intercalate) | |
data BuildStatus = AllGreen | |
| Borken | |
deriving (Eq, Show) | |
data Brogrammer = Johnny | |
| Arthur |
unless Rails.env.development? | |
require "active_record/connection_adapters/mysql2_adapter" | |
module ActiveRecord | |
module ConnectionAdapters | |
class Mysql2Adapter < AbstractAdapter | |
extend ActiveSupport::Memoizable | |
memoize :tables, :pk_and_sequence_for, :columns | |
end | |
end |
#Vim Cheat Sheet
gqip
- Reformats paragraph to textwidthgq
- Reformats selection:Tab /=
- Equally spaces based on the = symbol (requires Tabular vim plugin):setf language
- Changes current language:set language=language
- Changes current language<C-a>
- Increments the number under the cursor<C-x>
- Decrements the number under the cursor~
- Toggles case and moves to next character in normal modevar querystring = require('querystring'); | |
var http = require('http'); | |
var util = require('util'); | |
exports.process = function(message, sayCallback) { | |
if(message.indexOf('generate meme') !== -1) { | |
var params = message.split(' '); | |
if(exports.types[params[2]]) { | |
var linesRegex = new RegExp(params[2] + " (.*) / (.*)"); | |
var lines = linesRegex.exec(message); |
using System; | |
namespace Programmer { | |
public class Skillz { | |
public static void Main() { | |
Console.WriteLine("Round 1. CODE!"); | |
Console.WriteLine("--------------\n"); |