Skip to content

Instantly share code, notes, and snippets.

@u1tnk
u1tnk / html_practice.html
Created May 24, 2023 14:23 — forked from machida/html_practice.html
HTMLの練習(このレシピにマークアップをしてみましょう)
カレーのレシピ
誰でもできる、美味しいカレーの作り方です。旦那も息子もこのカレーが大好物。
ポイントは玉ねぎと人参はミキサーで細かくしてしまうところ。逆にコクのある美味しいカレーになります。
レシピの作者
山田サチ子さん
材料 ( 8皿分 )
// ==UserScript==
// @name Inoreader open in background tab
// @namespace http://mono0x.net/
// @version 0.0.1
// 元は https://gist.github.com/mono0x/4a6d2f19ca90668e41f85bb1c1952828
// @author mono/u1tnk
// 以下 include指定が /*が無いと入らなかったので修正
// @include https://www.inoreader.com/*
// @include https://irodr.netlify.app/
// @grant GM_openInTab
@u1tnk
u1tnk / image magick fill resize
Created April 18, 2011 13:13
ImageMagickで指定サイズで空白を埋める。
convert input.jpg -resize 1024x1024\> -size 1024x1024 xc:white +swap -gravity center -composite output.jpg
let locale = "jp"
let blacklists = ["*://mail.google.com/*","*://mail.google.com/*","*://mail.google.com/mail/*","*://www.inoreader.com/*","docs.google.com"]
let mapleader = ","
map ; :
map : ;
" macでSKKの変換と同時に動く為無視する
imap <C-j> <Nop>
[global]
ioengine=libaio
iodepth=1
size=1g
direct=1
runtime=60
directory=${TARGET}
stonewall
[Seq-Read]
@u1tnk
u1tnk / bc.rb
Last active December 14, 2015 13:59
画像ファイルのサイズ一覧からでかいの検出した
#!/usr/bin/env ruby
File.open('ids.txt') do |file|
while line = file.gets do
words = line.split(' ')
size = eval(words[1].gsub('x', '*'))
if size >= 640 * 960
p(words)
end

Ending

Unixのプロセスの動作はabstractionとcommunicationの二つについてだ

Abstraction

kernelはプロセスの抽象的(シンプル)なビューを持つ 私達のようなプログラマは二つの言語の違いをソースコードから見つけるのに慣れている

私達は色んな用途に使うたくさんのプログラムを習得している。 GCを持つようなプログラムでメモリ効率的なプログラムを書く事は不可能だ、Cを使わなければならない、けど、オブジェクトが必要だ。じゃあC++を使おう…

@u1tnk
u1tnk / main.lua
Created February 19, 2013 14:19
CoronaSDKのgroupへのマスクサンプル
local group = display.newGroup()
local rect1 = display.newRect(0, 0, 50, 1000)
rect1:setFillColor(255, 0, 0)
local rect2 = display.newRect(0, 0, 1000, 50)
rect2:setFillColor(0, 255, 0)
group:insert(rect1)
group:insert(rect2)
it "normal" do
a = [{id: 1, weight:1}, {id:2, weight: 3}, {id:3, weight:nil}]
check_count = 10
check_count.times do
sample_count = 1000
counts = {1 => 0, 2 => 0}
sample_count.times do
counts[a.sample_with_weight[:id]] += 1
end
(counts[1] < counts[2]).should be_true
We couldn’t find that file to show.