Skip to content

Instantly share code, notes, and snippets.

View jiikko's full-sized avatar
🦑

jiikko jiikko

🦑
View GitHub Profile
FROM debian:sid

RUN apt-get update && apt-get install git build-essential wget libssl-dev libreadline-dev zlib1g-dev vim curl -y
RUN git clone https://github.com/rbenv/ruby-build
RUN git clone https://github.com/rbenv/rbenv
RUN git clone --depth 1 https://github.com/rbenv/rbenv.git ~/.rbenv && \
      echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
RUN mkdir -p ~/.rbenv/plugins && \
 git clone --depth 1 https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
@jiikko
jiikko / 0_raft.md
Created May 24, 2019 07:50 — forked from sile/0_raft.md
Raft(分散合意アルゴリズム)について
@jiikko
jiikko / adv2notes.md
Created March 16, 2019 11:33 — forked from nicholasknight/adv2notes.md
Kinesis Advantage 2 notes

(NOTE: Current and future versions of this and any other Advantage 2-related things I post will be at https://github.com/nicholasknight/adv2keyboard)

I received my Advantage 2 today. There's no full manual yet, even though keyboards are apparently arriving (hint, hint, Kinesis). The quick start guide leaves out the "power user mode", and there are some other quirks.

Update: A manual has been posted at http://www.kinesis-ergo.com/advantage2-resources/

It includes a dictionary for the key maps, but I know it leaves at least one possible key undocumented: it does not list f14, but I have successfully mapped my scrollock to f14 regardless.

It also mentions a firmware version (1.0.18) that doesn't seem to be available yet, with a new feature (status report playback speed).

Debugging Redis Keyspace Misses

Simply put, a keyspace "MISS" means some piece of data you tried to retrieve from Redis was not there. This usually means that one of the following things happened:

  1. The key expired
  2. They key was renamed
  3. The key was deleted
  4. The key was evicted due to memory pressure
  5. The entire database was flushed
  6. The key was never actually inserted
@jiikko
jiikko / gist:b7aa08eacd572d34b7f8a187904f85b2
Created October 20, 2018 12:48 — forked from lantius/gist:2573472
Google App engine Python 2.5 version of pankratiev / python-amazon-ses-api, using method override
#!/usr/bin/python
# -*- coding: utf-8 -*-
from ek_settings import AMAZON_ACCESS_KEY_ID, AMAZON_SECRET_ACCESS_KEY
from amazon_ses import AmazonSES, EmailMessage
from google.appengine.api import urlfetch
from google.appengine.runtime import DeadlineExceededError
import urllib, logging
#===============================================================================================================================
@jiikko
jiikko / .travis.yml
Created May 18, 2018 16:39 — forked from BretFisher/.travis.yml
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@jiikko
jiikko / p.rb
Created July 25, 2017 08:22
migrate from old_path to new_path of paperclip.
def old_path
':rails_root/public/system/:class/:attachment/:id_partition/:style/:filename'
end
def migrate_old_pdf
logger = Logger.new('./migrate.log')
Invoice.find_each do |invoice|
unless invoice.pdf?
logger.warn "#{invoice.id} にPDFを持っていないためskipします"
next