Skip to content

Instantly share code, notes, and snippets.

View slightair's full-sized avatar
🍄
Hello

Tomohiro Moro slightair

🍄
Hello
View GitHub Profile
@slightair
slightair / gazoreply.user.js
Created December 4, 2013 05:57
replace gazoreply.jp copy image url
// ==UserScript==
// @name http://gazoreply.jp/
// @description replace gazoreply.jp copy image url
// @include http://gazoreply.jp/*
// @exclude http://gazoreply.jp/situation/*
// ==/UserScript==
window.addEventListener('load', function(){
var imgURL = document.getElementById("main-photo-img").getAttribute('src');
var clipboardButtonElement = document.getElementById("copy-clipboard-btn");
import UIKit
enum ズンドコ: UInt32 {
case ズン, ドコ
}
var list = [ズンドコ]()
while list != [.ズン, .ズン, .ズン, .ズン, .ドコ] {
let zundoko = ズンドコ(rawValue: arc4random_uniform(2))!
list.append(zundoko)
@slightair
slightair / CodePiece.swift
Created January 28, 2017 06:12
寿司増やして早くした #love_swift #CodePiece
import UIKit
import PlaygroundSupport
let view = UIView(frame: CGRect(x: 0, y:0, width:320, height:44))
view.backgroundColor = UIColor.black
PlaygroundPage.current.liveView = view
(0...10).forEach {
let sushi = UILabel(frame: CGRect(x: 320, y: 0, width: 44, height: 44))
import Foundation
protocol R {
associatedtype V
func hoge() -> V
}
struct R1: R {
typealias V = Int
@slightair
slightair / playground.swift
Last active January 17, 2020 05:47
Apple Combine + withLatestFrom operator
let just = Just<Int>(999)
let a = [1, 2, 3, 4, 5].publisher
.withLatestFrom(just)
.sink(receiveCompletion: {
print($0)
}, receiveValue: {
print($0)
})
print()
@slightair
slightair / aa.rb
Last active April 24, 2022 07:26
eval (%w{ e=27 .chr
;put s("6 6663 3600
6214 5541 2600 633" .cha rs.m
ap{[ ")%# %%%% %%%# %"," )%#%
eval (%w|
puts (' Tomohi
roMo ro ,hob
by:[game,p
rogr am ming
]')| *" ")####
#### ###