Skip to content

Instantly share code, notes, and snippets.

View stepney141's full-sized avatar

stepney141 stepney141

View GitHub Profile
@grkvlt
grkvlt / Tiny_RayTracing.txt
Created May 10, 2012 05:29
Tiny RayTracing Postscript
Tiny_RayTracing.ps by Takashi Hayakawa (h-takasi@isea.is.titech.ac.jp)
is a ray tracing program in only 762 bytes (plus header)!
BEST OBFUSCATED ARTWORK -- 1st prize
-- The 2nd most coveted prize. These combine obfuscation with great artwork.
Don't send this one to a printer. It will take too long. Display it
on the screen and be ready to wait a while. The picture is well worth it.
If you want to print the picture much faster, use Tiny_RayTracing_Fast.ps instead.
@taichi
taichi / code_reading.md
Last active April 10, 2024 13:04
太一のコードの読み方メモ

太一のコードの読み方メモ

全体として太一が感覚的に実践している事を論理的に説明しようと試みている為、
説明の粒度が適切でなかったり一貫性が無いように見える部分があるかもしれない。
普段やっているけども書ききれていない事も多分きっとある。

コードを読むとは何か

  • コードを嗜む
  • コードを学ぶ
  • 武器を手に入れる
@uhfx
uhfx / gist:3922268
Last active July 22, 2023 15:01
Twitter公式/非公式クライアントのコンシューマキー

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

@lunark
lunark / GenderEstimate.bas
Last active October 14, 2023 04:04
VBAマクロ向け関数。GenderEstimate。漢字の名前とふりがなから、性別を推定する関数
Public Function GenderEstimate(ByVal strMK As String, Optional strMF As String = "") As String
GenderEstimate = ""
strMK = Replace(Replace(Replace(strMK, " ", ""), " ", ""), "「", "")
strMF = Replace(Replace(StrConv(strMF, vbHiragana), " ", ""), " ", "")
'デバッグ用。こいつをブレークポイントに持ってきて挙動を確認する
'If strMK Like "理世" Then
' Debug.Print strMK
'End If
@naokazuterada
naokazuterada / buckup_web_to_static_files.md
Last active June 27, 2019 13:01
wgetで一括ダウンロード

サイトをwgetで一括ダウンロード

CMSなどで構築したウェブサイト( http://hoge.com/ )を静的なHTMLファイル形式で一括ダウンロード

注意点:jsなどで動的に参照されるリソースはリンクからはたどることが出来ず、ダウンロードされない。

wget http://hoge.com/ -P ~/Desktop/hoge.com -m -p -E -nH -k
@mala
mala / gist:5108900
Created March 7, 2013 15:38
攻撃者が生パスワードまず復元できないだろという状況でも全ユーザーのパスワードリセットしたほうが良い10の理由

Evernoteの話ですけど。「強固なパスワード暗号化技術を採用」していて、攻撃者がまず生パスワード復元できないだろう、という状況であっても、パスワードリセットはしたほうがいい。

2011年のLastpassのケースでは、強固なパスワード使っている人は大丈夫だけど、そうじゃない場合はブルートフォースでマスターパスワード取得されうるということを発表していた。これはハッシュ値生成のアルゴリズムが、既知 or 推測しやすい or ソースコードも含めて漏洩している、という時にこの状態になる。

"If you have a strong, non-dictionary based password or pass phrase, this shouldn't impact you - the potential threat here is brute forcing your master password using dictionary words, then going to LastPass with that password to get your data. Unfortunately not everyone picks a master password that's immune to brute forcing."

で、Evernoteのケースは「弊社は強固なパスワード暗号化技術を採用しておりますが」と言っている。

@0mg
0mg / twoauth.md
Created March 30, 2013 14:32
OAuth 対応 Twitter クライアント作成メモ

OAuth 対応 Twitter クライアント作成メモ

  • 前提: OAuth version 1.0a, Twitter API 1.1

OAuth 認証を通じてツイートするのに必要なたった 1 つのこと

リクエストヘッダに Authorization フィールドをセットする

OAuth 認証を通じてツイートするためには、API に対して POST する際、リクエストヘッダに Authorization フィールドを含める必要がある。

@yanofsky
yanofsky / LICENSE
Last active May 7, 2024 12:36
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@Asparagirl
Asparagirl / gist:6206247
Last active February 14, 2024 19:56
Have a WARC that you would like to upload to the Internet Archive so that it can eventually be included in their Wayback Machine? Here's how to upload it from the command line.

Do you have a WARC file of a website all downloaded and ready to be added to the Internet Archive? Great! You can do that with the Internet Archive's web-based uploader, but it's not ideal and it can't handle really big uploads. Here's how you can upload your WARC files to the IA from the command line, and without worrying about a size restriction.

First, you need to get your Access Key and Secret Key from the Internet Archive for the S3-like API. Here's where you can get that for your IA account: http://archive.org/account/s3.php Don't share those with other people!

Here's their documentation file about how to use it, if you need some extra help: http://archive.org/help/abouts3.txt

Next, you should copy the following files to a text file and edit them as needed:

export IA_S3_ACCESS_KEY="YOUR-ACCESS-KEY-FROM-THE-IA-GOES-HERE"
@chiral
chiral / qshogi.hs
Last active September 29, 2020 01:36
Quantum Shogi Program in Haskell
------------------------------------------------------------
-- Quantum Shogi Program in Haskell
------------------------------------------------------------
module Main where
import System.Environment
import Data.Maybe
import Data.List
import Data.Char