Skip to content

Instantly share code, notes, and snippets.

Verifying my Blockstack ID is secured with the address 1LaowvRBLG5iJcwhQVXWBGB7FHPxBk54my https://explorer.blockstack.org/address/1LaowvRBLG5iJcwhQVXWBGB7FHPxBk54my
@kn
kn / publications.json
Last active December 7, 2017 23:58
Since1953 API
This file has been truncated, but you can view the full file.
[{"title": "Molecular Structure of Nucleic Acids: A Structure for Deoxyribose Nucleic Acid", "authors": "Watson JD, Crick FH", "abstract": "", "journal": {"name": "Nature", "impact_factor": 0.0}, "refcount": "", "pubmed_id": "17804965", "published_on": "1953-04-25", "metadata": "{u'essn': u'1528-1132', u'pages': u'3-5', u'locationlabel': u'', u'pubdate': u'2007 Sep', u'medium': u'', u'pubtype': [u'Historical Article', u'Journal Article'], u'availablefromurl': u'', u'issue': u'', u'booktitle': u'', u'epubdate': u'', u'sorttitle': u'molecular structure of nucleic acids a structure for deoxyribose nucleic acid', u'lastauthor': u'Crick FH', u'title': u'Molecular structure of nucleic acids: a structure for deoxyribose nucleic acid.', u'fulljournalname': u'Clinical orthopaedics and related research', u'publisherlocation': u'', u'sortfirstauthor': u'Watson JD', u'sortpubdate': u'2007/09/01 00:00', u'uid': u'17804965', u'pmcrefcount': u'', u'pubstatus': u'4', u'history': [{u'pubstatus': u'pubmed', u'date': u'2007/09/
@kn
kn / gist:d1689208a3bdcd2e6084d21563ff2810
Created November 2, 2017 02:47
blockstack verification
Verifying my Blockstack ID is secured with the address 1JHMjN1gjVDVws29WJ56iLuBMiQEyoK35K https://explorer.blockstack.org/address/1JHMjN1gjVDVws29WJ56iLuBMiQEyoK35K
@kn
kn / README.md
Last active October 26, 2018 21:10
How to test Apple Pay integration with stripe.js?
  1. Follow Stripe's instructions to setup the Apple Pay Sandbox. Note that you need to pay $99 to enroll into Apple's Developer Program. Also, you need to use a real iOS device, not a simulator that comes with Xcode.
  2. Apple Pay only works over HTTPS so you need to use a tool like (stunnel)[https://www.stunnel.org/index.html] to serve your website over https locally.
###
# Automatically activate virtualenv if appropriate.
# This assumes virtualenvs are either:
# - in $WORKON_HOME folder, in which case it uses workon command to activate the virtualenv.
# - in ./local folder, in which case it uses ./setenv.sh to activate the virtualenv.
# Note: This will have a conflict if other script overrides cd command.
# e.g. rvm overrides cd command for local .rvm file.
###
cd() {
@kn
kn / japanese_chars.rb
Last active December 22, 2015 21:19
A collection of utility methods for Japanese chars.
# -*- coding: utf-8 -*-
require 'nkf'
def full2half(str)
NKF.nkf('-wxZ4Z1', str).gsub('-', 'ー')
end
def is_half?(str)
!!(/^[ -~。-゚]*$/.match str)
@kn
kn / TestTwitterFlightWithJasminOnRoR.md
Last active December 15, 2015 04:39
Test Twitter Flight components with Jasmine on Ruby on Rails

Test Twitter Flight components with Jasmine on Ruby on Rails

Twitter Flight is great framework for organizing frontend codebase. It make it more productive to work with and easier to test. However, it lacks in support for testing its modules. Moreover, there is not many guidance available on the web yet since it is fairly new.

This post explains how I setted up both in-browser and headless jasmine test for Twitter flight components used in Rails app.

Followings are used for the setup: