Skip to content

Instantly share code, notes, and snippets.

View Nyoho's full-sized avatar
:octocat:
GitHubing

北䑓如法 Nyoho

:octocat:
GitHubing
View GitHub Profile
@takaxp
takaxp / emacs-24.5-inline.patch
Created April 11, 2015 15:47
An inline patch for Emacs 24.5
diff -crN emacs-24.5/configure.ac emacs-24.5_patched/configure.ac
*** emacs-24.5/configure.ac 2015-04-02 16:23:06.000000000 +0900
--- emacs-24.5_patched/configure.ac 2015-04-12 00:10:11.000000000 +0900
***************
*** 1782,1788 ****
INSTALL_ARCH_INDEP_EXTRA=
fi
! NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o $macfont_file"
fi
@norio-nomura
norio-nomura / datesMatchingComponents.swift
Created March 18, 2015 15:04
SequenceOf<T>とGeneratorOf<T>を使う
import Foundation
func dates(#matchingComponents: NSDateComponents, var startDate: NSDate = NSDate(), endDate: NSDate = NSDate.distantFuture() as! NSDate) -> SequenceOf<NSDate> {
return SequenceOf<NSDate> { _ -> GeneratorOf<NSDate> in
let calendar = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian)!
calendar.timeZone = NSTimeZone(forSecondsFromGMT: 0)
return GeneratorOf<NSDate> {
if let nextDate = calendar.nextDateAfterDate(startDate, matchingComponents: matchingComponents, options: .MatchStrictly)
where nextDate.compare(endDate) != .OrderedDescending {
startDate = nextDate
@kwgch
kwgch / hiki.rb
Created December 30, 2014 06:07
rackメモ
#!/usr/bin/env ruby
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'hiki/app'
require 'rubygems'
require 'rack'
module Rack
class Request
@eiel
eiel / github-abc.md
Last active August 25, 2017 00:55
GitHubの参考になるサイトさがしたけど、うーん。むずかしい。

GitHub入門にオススメしたいサイトを探したり

対象者

HTMLやCSSのコーディングをする人

学んで欲しいこと

  • GitHubが何をするところなのか
  • 作品を公開するところ
@eiel
eiel / Myistp.hs
Last active August 29, 2015 14:10
Lisp インタープリタ勉強で学んだことを試した。
module Mylisp where
import Data.HashMap.Strict as HM hiding (map)
import Data.Maybe
import Data.List as L hiding (insert)
data Value = Func ([Value] -> Value) |
List [Value] |
Symbol String |
Number Int
@hirohitokato
hirohitokato / HKLCMTimeUtils.swift
Last active December 1, 2023 14:05
Convenience Methods/Variables/Operators for CMTime
//
// HKLCMTimeUtils.swift
//
// Created by Hirohito Kato on 2015/01/07.
// Copyright © 2020 Kato Hirohito. Licensed under Unlicense(https://unlicense.org). Feel free to use it!
import CoreMedia
// MARK: Initialization
public extension CMTime {
@norio-nomura
norio-nomura / How I stream from iPad to Twitch and Ustream.md
Last active November 20, 2020 18:18
How I stream from iPad to Twitch and Ustream.

How I stream from iPad to Twitch and Ustream.

I'm broadcasting my iPad game playing on Twitch.tv and Ustream.tv.

I'm using following hardwares.

  • Playing Game: iPad 3 w/ iOS 7.1.2
  • Broadcasting to Twitch: MacBook Air Mid 2011 w/ OS X 10.9

I'm using following softwares on Mac.

// See: https://devforums.apple.com/message/1000934#1000934
import Foundation
// Logic
operator prefix ¬ {}
@prefix func ¬ (value: Bool) -> Bool {
return !value
}
@hirohitokato
hirohitokato / gist:6235b668829313d3478c
Last active November 16, 2018 04:16
How to mute a photo shutter sound.
/*
Mute a shutter sound.
In detail, see http://stackoverflow.com/questions/4401232/avfoundation-how-to-turn-off-the-shutter-sound-when-capturestillimageasynchrono
*/
- (void)becomeSilentModeForCaptureOutput:(AVCaptureStillImageOutput *)imageOutput
{
if (!self.invertedSound) {
NSString *path = [[NSBundle mainBundle] pathForResource:@"photoShutter_inverted"
ofType:@"wav"];
@mahm
mahm / AudioManager.cs
Created February 16, 2014 04:27
Unity de sashimi
using UnityEngine;
using System.Collections;
public class AudioManager : SingletonMonoBehaviour<AudioManager> {
AudioClip bgm_Game;
AudioClip se_Tanpopo;
private const int source_bgm_Game = 0;
private const int maxAudio = 10;