Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
from __future__ import print_function | |
from Crypto.Cipher import DES3 | |
import os | |
import binascii | |
def xor_bytes(this, that): | |
return bytearray([ord(x) ^ ord(y) for x, y in zip(this, that)]) | |
# Parallel Checkout | |
# -------------------------------------------------------------- | |
# Example of performance gained by using a parallel checkout in an e-commerce store, | |
# | |
# to run 500 checkouts in series: time elixir checkout.exs 500 serial | |
# to run 500 checkouts in parallel: time elixir checkout.exs 500 parallel | |
# | |
# Typical E-commerce checkout flow uses a bunch of network bound tasks, that are generally | |
# computed synchronously. This wastes time and requires larger server clusters to handle peak times | |
# |
# Base class | |
class DynamicHostMailer < ActionMailer::Base | |
def initialize method_name=nil, host, *args | |
@host = host | |
super method_name, *args | |
end | |
def url_options | |
# Host should be checked against a relevant whitelist, this is only an example | |
{ host: @host } |
#put in lib/tasks/fixtures.rake | |
namespace :db do | |
namespace :fixtures do | |
desc 'Create YAML test fixtures from data in an existing database. | |
Defaults to development database. Set RAILS_ENV to override.' | |
task :dump => :environment do | |
sql = "SELECT * FROM %s" | |
skip_tables = ["schema_migrations"] | |
ActiveRecord::Base.establish_connection(:development) | |
(ActiveRecord::Base.connection.tables - skip_tables).each do |table_name| |