Skip to content

Instantly share code, notes, and snippets.

:shipit:
🐁🗯

Tomonori Tanabe tanb

:shipit:
🐁🗯
Block or report user

Report or block tanb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fetch.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import click
@click.command()
@click.option('--outfile', '-o')
@click.argument('src')
def fetch(outfile, src):
import requests
View gist:068b5fdeed013aa659bac1d15568e689

Install vagrant

 $ brew cask install vagrant
==> Downloading https://releases.hashicorp.com/vagrant/1.8.7/vagrant_1.8.7.dmg
######################################################################## 100.0%
==> Verifying checksum for Cask vagrant
==> Running installer for vagrant; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
Password:
==> installer: Package name is Vagrant
@tanb
tanb / hoge.swift
Created May 22, 2016
po (print object) Alamofire.Response.data as a String
View hoge.swift
po String.init(data: response.data!, encoding: NSUTF8StringEncoding)
View keybase.md

Keybase proof

I hereby claim:

  • I am tanb on github.
  • I am tanb (https://keybase.io/tanb) on keybase.
  • I have a public key whose fingerprint is D854 BC00 7352 C128 8FCB 4536 5825 714E 2349 64DC

To claim this, I am signing this object:

@tanb
tanb / dev_android.md
Last active May 10, 2016
Android app development: Let's Get Started
View dev_android.md

Let's Get Started

  • install java
$ brew cask install java
  • .bash_profile
@tanb
tanb / xhyve-nextbsd-tutorial.md
Last active Jun 10, 2017
NextBSD running on xhyve.
View xhyve-nextbsd-tutorial.md

NextBSD Running on Xhyve.

  _   _           _   ____ ____  ____
 | \ | | _____  _| |_| __ ) ___||  _ \
 |  \| |/ _ \ \/ / __|  _ \___ \| | | |
 | |\  |  __/>  <| |_| |_) |__) | |_| |
 |_| \_|\___/_/\_\\__|____/____/|____/

                                              ```                        `
                                             s` `.....---.......--.```   -/
@tanb
tanb / xhyve-freebsd-tutorial-1.md
Last active Aug 17, 2019
FreeBSD running on xhyve tutorial. (Appendix: Resize image with qemu. Create FreeBSD VM with qemu).
View xhyve-freebsd-tutorial-1.md

TL;DR

  • Create 5GB FreeBSD image.
  • Install FreeBSD on xhyve.
  • Mount host directory.

Requisites

View Pebble_C_UserInterface
- PROPERTYANIMATION
struct PropertyAnimation * property_animation_create_layer_frame(struct Layer * layer, GRect * from_frame, GRect * to_frame)
struct PropertyAnimation * property_animation_create(const struct PropertyAnimationImplementation * implementation, void * subject, void * from_value, void * to_value)
void property_animation_destroy(struct PropertyAnimation * property_animation)
void property_animation_update_int16(struct PropertyAnimation * property_animation, const uint32_t distance_normalized)
void property_animation_update_gpoint(struct PropertyAnimation * property_animation, const uint32_t distance_normalized)
void property_animation_update_grect(struct PropertyAnimation * property_animation, const uint32_t distance_normalized)
struct PropertyAnimation {
Animation animation
struct PropertyAnimation::@13 values
View Pebble_C_Graphics
- drowing path
GPath * gpath_create(const GPathInfo * init)
void gpath_destroy(GPath * gpath)
void gpath_draw_filled(GContext * ctx, GPath * path)
void gpath_draw_outline(GContext * ctx, GPath * path)
void gpath_rotate_to(GPath * path, int32_t angle)
void gpath_move_to(GPath * path, GPoint point)
struct GPath {
uint32_t num_points
GPoint points
View Pebble_C_Foundation
- App Entry Point
app_event_loop()
- Bluetooth module's sniff interval
void app_comm_set_sniff_interval(const SniffInterval interval)
SniffInterval app_comm_get_sniff_interval(void)
enum SniffInterval {
SNIFF_INTERVAL_NORMAL
SNIFF_INTERVAL_REDUCED
You can’t perform that action at this time.