Skip to content

Instantly share code, notes, and snippets.

View shaoshing's full-sized avatar

Shaoshing Li shaoshing

  • Meta
  • Bay Area, CA
  • 17:48 (UTC -08:00)
View GitHub Profile
@shaoshing
shaoshing / Gemfile
Created January 16, 2014 17:26
Using ActiveRecord in jRuby
source "https://rubygems.org"
gem 'activerecord', '~> 3.2.14'
gem 'activerecord-jdbcmysql-adapter', :platform => :jruby
@shaoshing
shaoshing / number2txt for SuperMemo
Last active August 2, 2022 20:43
Ruby script to convert Numbers file to txt, so that it can be imported into Supermemo.
#!/usr/bin/env ruby
#
# Usages
# num2txt path/to/your/file.numbers
require 'csv'
if !ARGV[0]
puts "Please specify a number file."
@shaoshing
shaoshing / Number2Txt for Flashcard Deluxe
Last active December 11, 2015 17:29
Shell script to convert Numbers file to txt that could imported to Flashcard Deluxe (an iOS app)
#!/bin/bash
#
# Usage:
# convert.sh ~/Downloads/Cards.numbers
# (must specify full path)
#
# AppleScript to convert from numbers to csv
osascript -e '
on run argv
interpolations :site_name
tags :title, :description, :keywords, :robot
meta_variables
meta_attrs :title, :description, :keyword, :name
# product_path
# products#show