Rails flash messages with AJAX requests
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |
There are many (old) clients available:
- https://github.com/tpitale/legato (active, supports API v3)
- https://github.com/activenetwork/gattica
- https://github.com/vigetlabs/garb
The Google Analytics API is at v3 (at time of writing).
This example uses Google's Ruby API client to access Analytics. Use https://github.com/google/google-api-ruby-client (Google supported).
require 'gmail' | |
label = 'MY LABLE' | |
gmail = Gmail.connect('USERNAME', 'PASSWORD') | |
gmail.mailbox(label).emails.each do |email| | |
mailbox = email.sender.first.mailbox | |
host = email.sender.first.host | |
puts "#{mailbox}@#{host}" | |
end |
Rails flash messages with AJAX requests & twitter-bootstrap 2.3
Forked from https://gist.github.com/linjunpop/3410235 Based on Stackoverflow answer: http://stackoverflow.com/a/10167659/656428
License: MIT
# GLOBAL CONFIGURATIONS | |
# ------------------------------------------------------------------- | |
# See https://github.com/jigish/slate/wiki/Global-Configs | |
config defaultToCurrentScreen true | |
config secondsBeforeRepeat 0.4 | |
config secondsBetweenRepeat 0.1 | |
config keyboardLayout "qwerty" | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize |
# assumptions: virtualbox, vagrant already installed | |
# and there is a box lucid32 | |
1. rails new appdmeo , gem capistrano , then bundle | |
2. vagrant init lucid32 | |
3. capify . | |
# !important | |
# vagrant ssh-config >> ~/.ssh/config | |
# vagrant ssh-config | grep IdentityFile | awk '{print $2}' that's where private key located |
package main | |
import ( | |
"database/sql" | |
"errors" | |
"fmt" | |
_ "github.com/bmizerany/pq" | |
"os" | |
"regexp" | |
"strings" |
Changes:
-
this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .
ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.
-
this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.
This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.