-
Uses native vim regexes (which are slightly different from the regexes used by grep, ack, ag, etc) so the patterns are the same as with vim's within-file search patterns.
You can do a normal within-file search first, then re-use the same pattern to
Uses native vim regexes (which are slightly different from the regexes used by grep, ack, ag, etc) so the patterns are the same as with vim's within-file search patterns.
You can do a normal within-file search first, then re-use the same pattern to
#!/usr/bin/env bash | |
# REF: https://cloud.google.com/intrusion-detection-system/docs/configuring-ids | |
export PROJECT_ID=$(gcloud config get-value project) | |
export PROJECT_USER=$(gcloud config get-value core/account) # set current user | |
export PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID --format="value(projectNumber)") | |
export IDNS=${PROJECT_ID}.svc.id.goog # workload identity domain | |
export GCP_REGION="us-west4" # CHANGEME (OPT) |
Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.
# frozen_string_literal: true | |
require "zlib" | |
require 'set' | |
class InterleaverArray | |
TEAM_A_NAME = "A" | |
TEAM_B_NAME = "B" | |
attr_accessor :a, :b, :a_index, :b_index, :a_size, :b_size |
require './gen' | |
gen(10000, 1_000_000) | |
puts "generated data for: 10,000 users, 1 million events, 100 events per user." | |
puts "\ncurl -Ss -d@insert.json -XPOST 'http://localhost:6302' | jq ." | |
puts `curl -Ss -d@insert.json -XPOST 'http://localhost:6302' | jq .` | |
# note it will pass 10,000 user_ids on every select | |
puts "\ncurl -Ss -d@select.json -XGET 'http://localhost:6302?coalesce=true&limit=20' | jq . | grep duration" |
┌──────────────────────────────────────────────┐ ┌──────────────────────────────────────────────┐ | |
│ │ │ │ | |
│ Select Library ▼ Q ▕▽ │ │ Select Library ▼ Q ▕▽ │ | |
│ │ │ │ | |
├──────────────────────────────────────────────┤ ├──────────────────────────────────────────────┤ | |
│ TO READ ▕ READING ▕ FINISHED ▕ ALL │ │ ALL ▕ TO READ ▕ READING ▕FINISHED │ | |
├──────────────────────────────────────────────┤ ├──────────────────────────────────────────────┤ | |
│ Nov 2014 All Genres │ │ Nov 2014 All Genres │ | |
├──────────────────────────────────────────────┤ ├──────────────────────────────────────────────┤ | |
│ |
class Simhash | |
attr_reader :weights, :bits_length, :bitmasks | |
def initialize(bits_length=64) | |
@bits_length = bits_length | |
@weights = Array.new(@bits_length, 0.0) | |
@bitmasks = Array.new(@bits_length) | |
(0...@bits_length).each do |i| | |
@bitmasks[i] = (1 << i) | |
end | |
end |