Assume followings:
/mykeys/.ssh/prodserver.pem
- is a certificate file
umid
- is a user name
111.111.111.111
- is a remote host, that mongodb runs
import { Router } from "express"; | |
import jwt from "jsonwebtoken"; | |
import jwkToPem from "jwk-to-pem"; | |
import * as Axios from 'axios'; | |
interface PublicKeys { | |
keys: PublicKey[]; | |
} | |
interface PublicKey { | |
alg: string; |
Priority Queues | |
═══════════════ | |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
INSERT DEL-MIN MIN DEC-KEY DELETE MERGE | |
binary log n log n 1 log n log n n | |
binomial 1 log n 1 log n log n log n | |
Fibonacci 1 log n† 1 1† log n† log n | |
Pairing 1† log n† 1† 1† log n† 1† | |
Brodal-Okasaki 1 log n 1 1 log n 1 |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
# Simple password generation in Ruby. | |
# | |
# Generate reasonably secure random passwords of any chosen length, | |
# designed to be somewhat easy for humans to read and remember. | |
# Each password has a capitalized letter and a digit. | |
# | |
# Example: |
# minimal rails3 app | |
require 'action_controller' | |
Router = ActionDispatch::Routing::RouteSet.new | |
Router.draw do | |
root :to => 'site#index' | |
end | |
class SiteController < ActionController::Metal |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
# Untested, but it should work :) | |
class Something < ActiveRecord::Base | |
# Simpler approach available with this small Rails patch: | |
# http://rails.lighthouseapp.com/projects/8994/tickets/1773-allow-returning-nil-from-a-named_scope-lambda | |
# | |
# named_scope :with_town_like, lambda { |term| | |
# { :conditions => ['town LIKE ?', term] } unless term.blank? | |
# } | |
# |