Skip to content

Instantly share code, notes, and snippets.

Atomコードリーディングメモ

ビルド方法

script/build

起動したらsrc/window-bootstrap.coffeeが起動時間のログを出してるので、そいつをgrepすると/src/broweser/atom-application.coffee が引っかかる。

src/broweser/atom-application.coffee は、 src/browser/main.coffee に呼ばれている

@hokaccha
hokaccha / sushi
Created April 30, 2014 07:52
Macのターミナルに寿司を降らせる
$ ruby -e 'C=`stty size`.scan(/\d+/)[1].to_i;S="\xf0\x9f\x8d\xa3";a={};puts "\033[2J";loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H"};$stdout.flush;sleep 0.01}'
/*
-----------------------------------
Emoji - natural display for the web
-----------------------------------
These font face definitions allows to display emoji glyphs intermingled with
arbitrary characters outside emoji unicode blocks.
Usage
@motemen
motemen / Ojisan-Patterns.md
Last active March 7, 2025 08:19
おじさんパターン集
  • その面白そうな話、私も参加していいよね?なぜなら私は無条件に受け入れられているからおじさん(闖入おじさん) #おじさんパターン
  • 後出し難癖おじさん #おじさんパターン
  • 困難は成長のチャンス!だから君たちに成長の機会をあげようおじさん (成長おじさん) #おじさんパターン
  • あらゆる事案に一般論コメントおじさん #おじさんパターン
  • 俺ってあらゆることに精通してるじゃん?だから力になるよおじさん (精通おじさん) #おじさんパターン
@voluntas
voluntas / shiguredo_recruit.rst
Last active April 9, 2025 04:17
時雨堂を支える採用
@taea
taea / rm_pid.md
Last active January 12, 2023 14:22
postgres をちゃんと終了しないと.pidファイルが残っちゃって、Rails が起動しないもんだい

Rails 起動しようとするとこんなエラーでる

PG::ConnectionBad at /
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
@toshinarin
toshinarin / show_fps
Last active August 29, 2015 13:55
ブラウザのFPSを表示するブックマークレット
javascript:!function(){$(function(){var requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;var prev=0;var info=$('<div id="testest"></div>').css({position:"fixed",left:10,bottom:20,backgroundColor:"rgba(0, 0, 0, 0.8)",fontSize:12,color:"#ffffff",padding:5,zIndex:1e5}).appendTo("body");var count=0;function step(timestamp){if(++count==30){info.text((1e3/((timestamp-prev)/count)+"").substr(0,5));prev=timestamp;count=0}requestAnimationFrame(step)}requestAnimationFrame(step)})}();
@hfm
hfm / readme.md
Last active January 4, 2016 08:09

こんな感じのシェルスクリプトを書く

#!/bin/bash

ssh <user-id>@`basename $0`

$PATHのどこかにドメイン名でsymlinkを貼る

@studiomohawk
studiomohawk / extra.extra-advent-calendar.md
Last active April 27, 2016 07:45
とあるレコメンデーションAPI(クローズド)について。[Frontrend Advent Calendar 2013](http://www.adventar.org/calendars/62)の15日目への寄稿。

Extra! Extra!

16世紀から17世紀にかけてのイングランドの哲学者であるFrancis Baconは:

人間の知識と力は一致する、というのも、原因を知らなければ、結果を生み出すこともできないからだ。

という言葉を著書"ノヴム・オルガヌム"に残した。

私、斉藤祐也(@cssradar)はすでにご存じの方も多いかもしれないが、情報を収集しニュースを書くための学問であるジャーナリズムを専攻し、巡り巡って現在はフロントエンド開発者をしている。

# 私が考える安全なプログラムを書くために必要なこと
今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。
- ファイルを開こうとしたらコマンドを実行できてしまったり
- CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり
- SELECT文を発行するつもりがDELETE文を発行できてしまったり
こういったときに
- 入力値検証をしないと危険になる