Skip to content

Instantly share code, notes, and snippets.

Avatar

moyashi moyashi

View GitHub Profile
@ksasao
ksasao / Form1.cs
Last active Jan 15, 2020
Windows 10 のオンライン連続音声認識が不定期に止まってしまうのを回避したコード
View Form1.cs
// Windows 10 の Windows.Media.SpeechRecognition で連続音声認識をします。
// 標準的な使い方では、音声認識が不定期に動作しなくなることが知られていますが、
// https://social.msdn.microsoft.com/Forums/en-US/5afbf9fa-d660-4a7d-b24e-e9e673282244/uwpccontinuous-speech-recognition-is-not-continuous-it-stops-randomly?forum=wpdevelop
// https://social.msdn.microsoft.com/Forums/windowsapps/en-US/1af5f3d1-d5b2-4a0c-956c-53f550e8f1d1/uwpdesktop-bridgesend-speech-recognition-argsresult-as-parameter-in-uwp-desktopbridge-package?forum=wpdevelop#96188ce3-47bd-4537-b1af-fb4c6a362c84
// それを回避しています。
//
// ビルドするためには
// [参照]で右クリック > NuGetパッケージの管理 > 右上の歯車マーク(設定)で右クリック >
// NuGet パッケージマネージャー > 全般 > 既定のパッケージの管理 を PackageReference に
// に変更してから、プレスリリース版を含める、にチェックを入れ、Microsoft.Windows.SDK.Contracts を検索して追加してください。
@steventroughtonsmith
steventroughtonsmith / DrawingKit.swift
Created Sep 16, 2016
DrawingKit playground for iOS 10
View DrawingKit.swift
import PlaygroundSupport
import Foundation
import UIKit
Bundle(path: "/System/Library/PrivateFrameworks/DrawingKit.framework")?.load()
let DKInkView = NSClassFromString("DKInkView") as! UIView.Type
extension UIView {
func newGPUAvailable() -> Bool {
@lukf
lukf / dayone-twitter.py
Last active Aug 29, 2015
twitter to dayone script for Pythonista
View dayone-twitter.py
import console, datetime, feedparser, sys, urllib, webbrowser
username = 'USERNAME' # Your username
console.clear()
fmt='{published}\n> [{title}][{i}]\n[{i}]: {link}\n\n'
i = 0
outp = ''
todayString = datetime.date.today().strftime("%Y-%m-%d")
feedURL = 'http://www.rssitfor.me/getrss?name=' + username
for post in feedparser.parse(feedURL).entries:
if todayString in post.published:
@lukf
lukf / dayone-reporter.py
Last active Feb 22, 2017
reporter to dayone script for Pythonista
View dayone-reporter.py
# -*- coding: utf-8 -*-
import console, datetime, json, os, sys, urllib, webbrowser
selected = "no"
console.clear()
# I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder
sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')]
import dropboxlogin # this code can be found here https://gist.github.com/4034526
# API app needs to be set up as root; set access_type to "dropbox".
dropbox_client = dropboxlogin.get_client() # auth
todayString=datetime.date.today().strftime('%Y-%m-%d')
@kishikawakatsumi
kishikawakatsumi / main.m
Created Jan 14, 2014
One-line fix for UITextView on iOS 7
View main.m
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"UIDisableLegacyTextView"];
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
@hirohitokato
hirohitokato / ViewController.m
Created Dec 17, 2013
Video capturing with the highest fps.
View ViewController.m
@import AVFoundation;
#import "ViewController.h"
@interface ViewController ()
@property (nonatomic)AVCaptureSession *session;
@end
@implementation ViewController
- (void)viewDidLoad
@tako2
tako2 / theta360.py
Created Dec 1, 2013
Controlls RICOH THETA 360 (Python).
View theta360.py
#!/usr/bin/env python
# coding: UTF-8
import socket
import struct
DEBUG = True
DEBUG2 = False
PTP_OC_GetDeviceInfo = 0x1001
@kioku-systemk
kioku-systemk / thetashot.js
Created Nov 29, 2013
RICOH THETAでシャッターを切るサンプル(node.js版)
View thetashot.js
/*
RICOH THETA remote shutter for node.js
coded by @kioku_systemk
code license is public domain.
this code is referenced from @MobileHackerz and @GOROman
https://gist.github.com/GOROman/7596186
*/
var net = require('net');
@GOROman
GOROman / ThetaTest.rb
Last active Jan 13, 2016
PCからTHETAのシャッターを切る最小限のサンプルプログラム
View ThetaTest.rb
#!ruby
#
# THETAのシャッターをPCから遠隔で切るだけの例 by GOROman
#
# 参考にしたページ
# http://mobilehackerz.jp/contents/Review/RICOH_THETA
require 'socket'
@partlyhuman
partlyhuman / pebble-jsapi-local.js
Created Nov 14, 2013
Seed of a local testing harness for quick iteration of PebbleJS apps. Could add to this providing a way to simulate appmessages, etc.
View pebble-jsapi-local.js
var Pebble = new (function(){
var dispatchTable = {};
this.addEventListener = function(eventName, delegate) {
if (!(eventName in dispatchTable)) dispatchTable[eventName] = [];
dispatchTable[eventName].push(delegate);
}
this.dispatchEvent = function(event) {
You can’t perform that action at this time.