Skip to content

Instantly share code, notes, and snippets.

View jiikko's full-sized avatar
🦑

jiikko jiikko

🦑
View GitHub Profile
#!/bin/bash
cd /sys/kernel/config/usb_gadget/
mkdir -p procon
cd procon
echo 0x057e > idVendor
echo 0x2009 > idProduct
echo 0x0200 > bcdDevice
echo 0x0200 > bcdUSB
echo 0x00 > bDeviceClass
@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 / _form.html.erb
Last active July 22, 2017 01:13 — forked from jabbett/_form.html.erb
ActsAsTaggableOn with collection_check_boxes
<%= form_for(@sundae) do |f| %>
<!--
collection_check_boxes requires 4 parameters, the last two are methods that access
the value and text from the collection, respectively. Hence the need for
SundaesHelper.valid_flavors!
-->
<%= f.collection_check_boxes(:flavor_list, Sundae::FLAVORS, :itself, :itself) do |b| %>
<!-- FYI: I use Bootstrap 4, so I customized how the checkboxes would render -->
<div class="form-check">
<label class="form-check-label"><%= b.check_box class: 'form-check-input' %> <%= b.value %></label>
@jiikko
jiikko / how_to_download_streaming_jp.md
Created July 4, 2017 22:53 — forked from rokugasenpai/how_to_download_streaming_jp.md
各ストリーミング配信のダウンロード方法(要curl・ffmpeg・rtmpdump・chrome・limechat・wireshark)

ツイキャス

@jiikko
jiikko / pre-push
Created January 7, 2016 04:12 — forked from tmsanrinsha/pre-push
#!/usr/bin/env bash
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
=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')