This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TF_VAR_os=debian_12 terraform apply | |
module.k0sctl.data.http.k0s_version[0]: Reading... | |
module.k0sctl.data.http.k0s_version[0]: Read complete after 0s [id=https://docs.k0sproject.io/stable.txt] | |
module.infra.data.aws_availability_zones.available: Reading... | |
module.infra.data.aws_vpc.default: Reading... | |
module.os.data.aws_ami.debian_12[0]: Reading... | |
module.infra.data.aws_availability_zones.available: Read complete after 0s [id=ap-northeast-1] | |
module.os.data.aws_ami.debian_12[0]: Read complete after 0s [id=ami-0bef69e9bf0a285ef] | |
module.infra.data.aws_ec2_instance_type_offerings.in_available_azs["t3a.small"]: Reading... | |
module.infra.data.aws_ec2_instance_type_offerings.in_available_azs["t3a.small"]: Read complete after 1s [id=ap-northeast-1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.* | |
interface OnClickListener: Serializable { | |
fun onClick() | |
} | |
fun main(args: Array<String>) { | |
val l: OnClickListener = object: OnClickListener { | |
override fun onClick() { | |
println("\nhello kt") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.requestIdleCallback(function(d) { for (i = 0; i < 1000000; i++) { if ( d.timeRemaining() == 0 ) { return } else { console.log([d.timeRemaining(), d.didTimeout]) } } }, 200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function benchmark(title, iteration, callback) { start = performance.now(); for (i = 0; i < iteration; i++ ) { callback(); }; end = performance.now(); console.log("%s: time: %f, average: %f", title, end - start, ( end - start ) / iteration); } | |
function benchmarkSIMD(iteration) { | |
console.log(navigator.userAgent); | |
let a = SIMD.Float32x4(1, 2, 3, 4); | |
let b = SIMD.Float32x4(2,3,4,5); | |
let aa = [1,2,3,4]; | |
let bb = [2,3,4,5]; | |
benchmark("add SIMD", iteration, function() { return SIMD.Float32x4.add(a, b) }); | |
benchmark("add", iteration, function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SomeModule | |
def self.apply(context) | |
context.instance_exec do | |
# 実行させたい処理を書く | |
end | |
end | |
end | |
Your::Application.routes.draw do | |
SomeModule.apply(self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'dalli' | |
dalli = Dalli::Client.new("localhost:11211") | |
p dalli.set("foo", 1) | |
p dalli.get("foo") | |
10.times do | |
pid = Process.fork do | |
# dalli.reset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
exec 1>&2 | |
git status --porcelain | cut -f3 -d ' ' | xargs -I% cat % | grep -A 3 -B 3 '<<<<< HEAD' && echo "********************** WARNING ***********************" && echo " CONFLICT MARKER FOUND" && echo "******************************************************" && exit 1 | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Capture::Tiny ':all'; | |
sub main { | |
my @args = @_; | |
my $stderr = do_try(@args); | |
while (1) { | |
if ( $stderr && $stderr =~ /Can't locate (.+?)\.pm / ) { | |
my $file = $1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hoge | |
p def fuga | |
p "called fuga" | |
end | |
fuga | |
end | |
hoge | |
fuga |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*[git]origin/masterへmergeずみのリモートブランチをまとめてお掃除したい。 | |
** まとめ | |
>|| | |
$ git fetch --prune | |
$ git fetch | |
$ git branch -r --merged origin/master | grep -v origin/master | sed -e 's/origin\//:/' | xargs echo git push origin | |
||< |
NewerOlder