git init
or
# git-freeze: take the current index and working tree state and "freeze" them | |
# by creating a commit for each as necessary | |
# | |
# git-thaw: look for commits created by git-freeze and restore them to | |
# working tree or index as appropriate | |
# alias gf='git-freeze' | |
# alias gt='git-thaw' | |
function git-freeze () { |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
require 'benchmark' | |
arr = (1..100).to_a | |
Benchmark.bm(20) do |x| | |
x.report("each.with_index") do | |
100_000.times do | |
arr.each_with_index do |v, i| | |
end |
# MODEL | |
class Case < ActiveRecord::Base | |
include Eventable | |
has_many :tasks | |
concerning :Assignment do | |
def assign_to(new_owner:, details:) | |
transaction do |
To use this bot:
ads_bot.py
and requirements.txt
.pip install -r requirements.txt
to install the requirements.Moved to a proprer repositoy, TSWS is a real boy now! | |
https://github.com/dfletcher/tsws | |
PRs welcomed. |
codecov: | |
token: uuid # Your private repository token | |
url: "http" # for Codecov Enterprise customers | |
slug: "owner/repo" # for Codecov Enterprise customers | |
branch: master # override the default branch | |
bot: username # set user whom will be the consumer of oauth requests | |
ci: # Custom CI domains if Codecov does not identify them automatically | |
- ci.domain.com | |
- !provider # ignore these providers when checking if CI passed | |
# ex. You may test on Travis, Circle, and AppVeyor, but only need |
function sync() { | |
var id="XXXXXXXXXX"; // CHANGE - id of the secondary calendar to pull events from | |
var today=new Date(); | |
var enddate=new Date(); | |
enddate.setDate(today.getDate()+7); // how many days in advance to monitor and block off time | |
var secondaryCal=CalendarApp.getCalendarById(id); | |
var secondaryEvents=secondaryCal.getEvents(today,enddate); |