Skip to content

Instantly share code, notes, and snippets.

@niw
niw / README.en.md
Last active February 13, 2024 04:24
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
@ksasao
ksasao / Form1.cs
Last active January 15, 2020 02:47
Windows 10 のオンライン連続音声認識が不定期に止まってしまうのを回避したコード
// 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 を検索して追加してください。
@moshfeu
moshfeu / extension.js
Created September 22, 2018 22:02
Get current line content in vscode extension
const {text} = activeEditor.document.lineAt(activeEditor.selection.active.line);
@steventroughtonsmith
steventroughtonsmith / DrawingKit.swift
Created September 16, 2016 16:43
DrawingKit playground for iOS 10
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 {
@kishikawakatsumi
kishikawakatsumi / main.m
Created January 14, 2014 18:52
One-line fix for UITextView on iOS 7
#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 December 17, 2013 05:52
Video capturing with the highest fps.
@import AVFoundation;
#import "ViewController.h"
@interface ViewController ()
@property (nonatomic)AVCaptureSession *session;
@end
@implementation ViewController
- (void)viewDidLoad
@tako2
tako2 / theta360.py
Created December 1, 2013 14:13
Controlls RICOH THETA 360 (Python).
#!/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 November 29, 2013 19:44
RICOH THETAでシャッターを切るサンプル(node.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 January 13, 2016 05:18
PCからTHETAのシャッターを切る最小限のサンプルプログラム
#!ruby
#
# THETAのシャッターをPCから遠隔で切るだけの例 by GOROman
#
# 参考にしたページ
# http://mobilehackerz.jp/contents/Review/RICOH_THETA
require 'socket'
@partlyhuman
partlyhuman / pebble-jsapi-local.js
Created November 14, 2013 23:42
Seed of a local testing harness for quick iteration of PebbleJS apps. Could add to this providing a way to simulate appmessages, etc.
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) {