Skip to content

Instantly share code, notes, and snippets.

@yoheioka
yoheioka / test_ics.ics
Last active January 26, 2024 19:41
test_ics.ics
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:TEST3
X-WR-TIMEZONE:America/Los_Angeles
BEGIN:VEVENT
DTSTART:20240127T024500Z
DTEND:20240127T045000Z
@yoheioka
yoheioka / gemini_example.py
Last active January 30, 2021 03:17
example of selling on gemini
import os
import requests
import json
import base64
import hmac
import hashlib
import datetime, time
def make_sell(amount, price):
from bs4 import BeautifulSoup
import requests
import csv
import itertools
TERMS = ['2020FA', '2020JA', '2019SP']
BASE_URL = 'https://eduapps.mit.edu/ose-rpt/'
TERM_URL = BASE_URL + 'subjectEvaluationSearch.htm?termId=%s&departmentId=++15&subjectCode=&instructorName=&search=Search'
HEADERS = {
'Connection': 'keep-alive',
@yoheioka
yoheioka / monitors.lua
Created May 16, 2020 08:21
Hacking the Caps Lock Key Part 2 monitors.lua
local hotkey = require 'hs.hotkey'
local window = require 'hs.window'
local geometry = require 'hs.geometry'
local mouse = require 'hs.mouse'
local screen = require 'hs.screen'
local position = import('utils/position')
local monitors = import('utils/monitors')
local function init_module()
@yoheioka
yoheioka / arrows.lua
Last active May 16, 2020 08:15
Hacking the Caps Lock Key Part 2 arrows.lua
local hotkey = require 'hs.hotkey'
local window = require 'hs.window'
local position = import('utils/position')
local monitors = import('utils/monitors')
local function module_init()
local keys = config:get("arrows.keys", {
UP = "top",
DOWN = "bottom",
@yoheioka
yoheioka / init.lua
Last active May 16, 2020 08:15
Hacking the Caps Lock Key Part 2 init.lua
local alert = require 'hs.alert'
import = require('utils/import')
import.clear_cache()
config = import('config')
-- CONFIG FOR CAPS LOCK HACKING START
-- reference: https://github.com/lodestone/hyper-hacks/blob/master/hammerspoon/init.lua
-- A global variable for the Hyper Mode
@yoheioka
yoheioka / config.lua
Created May 16, 2020 07:54
Hacking the Caps Lock Key Part 2 config.lua
local config = {}
config.modules = {
"arrangement",
"monitors",
"arrows",
"fullscreen"
}
-- Maps monitor id -> screen index.
@yoheioka
yoheioka / init.lua
Created May 16, 2020 03:59
Hacking the Caps Lock Key Part 1
-- CONFIG FOR CAPS LOCK HACKING START
-- reference: https://github.com/lodestone/hyper-hacks/blob/master/hammerspoon/init.lua
-- A global variable for the Hyper Mode
k = hs.hotkey.modal.new({}, "F17")
local application_shortcuts = {
b = "Google Chrome",
u = "Sublime Text",
l = "LINE",
k = "Skype",

Task:

Write a Simple API that can:

  • Create a user and register books that he/she owns
  • Transfer book ownership

Requirements:

  • Use AWS API Gateway with Lambda functions
  • Use Dynamodb as the DB

Keybase proof

I hereby claim:

  • I am yoheioka on github.
  • I am yoheioka716 (https://keybase.io/yoheioka716) on keybase.
  • I have a public key ASDDTzNRqkseveZFNdULiMS9akPOMxVtzeOe1PzrMTqYXAo

To claim this, I am signing this object: