Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; move file here ;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(require 'dash) | |
(require 'swiper) | |
;; start directory | |
(defvar bjm/move-file-here-start-dir (expand-file-name "~/downloads")) | |
(defun bjm/move-file-here () |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
def main | |
url = Popup.input "amebloのURLを入力してください" | |
url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D'" + url + "'%20and%20xpath%3D'%2F%2Fimg%5Bcontains(%40src%2C%20%22http%3A%2F%2Fstat.ameba.jp%2Fuser_images%2F%22)%5D%5Bnot(contains(%40src%2C%20%22%3Fcpd%3D%22))%5D'&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" | |
json = Browser.json url | |
p json | |
end |
これを読んでる。
この本の中で「トランザクティブ・メモリー」という話がでてきた。概要は以下のコラムに書いてる。
a=0xE3.chr+0x81.chr+0x82.chr | |
puts a |
Ruby+Rails を始めるのにこの辺をおさえておくといいのでは。 というのを書いていきます。
Ruby
Ruby のコードを読んでいると
class Hoge
class << self
def hello
puts 'hello'
end
end
end
#import <UIKit/UIKit.h> | |
@interface MyTextView : UITextView | |
- (void)replaceSelectionWithAttributedText:(NSAttributedString *)text; | |
- (void)replaceRange:(NSRange)range withAttributedText:(NSAttributedString *)text; | |
@end |
# 私が考える安全なプログラムを書くために必要なこと | |
今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。 | |
- ファイルを開こうとしたらコマンドを実行できてしまったり | |
- CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり | |
- SELECT文を発行するつもりがDELETE文を発行できてしまったり | |
こういったときに | |
- 入力値検証をしないと危険になる |