Skip to content

Instantly share code, notes, and snippets.

@shyouhei
shyouhei / gist:63d91a7934f31ef08e08ef4f23d0a30b
Created August 29, 2020 14:26
フルタイムでオープンソース・ソフトウェアを開発すると開発者にはどういう変化が訪れるか(個人の感想レベル)

フルタイムでオープンソース・ソフトウェアを開発すると開発者にはどういう変化が訪れるか(個人の感想レベル)

高給に耐えるという謎の感覚が涵養される

特に何もやってあげてないのに他人(法人だけどさ)から何百万何千万のお金が何年もとめどなく注ぎ込まれてきたら、怖くないですか?

オープンソース・ソフトウェアの開発者だけで給料をもらうというのは、まさにこの現象が発生してくるわけ。それまでもこれからも、ずっとオープンソース・ソフトウェアの開発者はやってきたし、やっていくわけでしょう。そんなの会社があってもなくても、別にやることなんて変わらないじゃない。じゃあなんで、ある時から急にかなりの金額が振り込まれてきてしまうんだ?しかもあからさまに物価上昇を上回る結構なハイペースで昇給していく。やっていることは一切何も変わってないのに!

この状況に適応するまでにはいささかの時間を要しました。根が小心者なので。

@sys9kdr
sys9kdr / Puppeteerがクローリングに使えるかも.md
Created December 16, 2017 18:03
Puppeteerがクローリングに使えそう

この記事はWebスクレイピング Advent Calendar 2017の17日目の記事です。puppeteerでクローリングします。

Google Chrome(Chromium)でクローリングをやる

SPAみたいなちょっと凝ったWebサイトをクローリングするときは一昔前はSelenium + PhantomJSあたりが鉄板でしたが、今後はSelenium + Headless ChromeもしくはPuppeteer + Headless Chromeが主流となっていく見通しです。 (HeadlessとはGUIアプリケーションのGUIを介さないモードのことです。)

前者についてはWeb上に情報も多いですが、Puppeteerでクローリングする話をそんなに見ない気がするのでクローリングの歴史を踏まえてやってみます。

一昔前のクローリング

@ktx2207
ktx2207 / Git_ファイルの履歴を完全に削除する.md
Last active February 17, 2024 05:32
Git ファイルの履歴を完全に削除する

Git ファイルの履歴を完全に削除する

秘密鍵など誤ってコミットしてしまった場合に履歴を完全に削除する手順
参考:6.4 Git のさまざまなツール - 歴史の書き換え

動作確認用にブランチを作成して試す

$ git checkout -b clean-key-file

動作確認用にブランチでgit filter-branchを実行

@uupaa
uupaa / get.path.for.node.js.md
Last active March 7, 2025 14:03
node.js で絶対パスや相対パスを取得する方法 npm __dirname

node.js でパスを取得する方法についてのメモ

$ node ~/hoge/Foo.js/a.js

を実行したときに、

  • process.argv[1] から、node コマンドに指定された a.js のパス( ~/hoge/Foo.js/a.js )を取得できます
@branneman
branneman / better-nodejs-require-paths.md
Last active June 24, 2025 22:40
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@tksmaru
tksmaru / CollectionUtils.java
Created April 3, 2013 13:59
Listを指定サイズ毎に分割するutility
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class CollectionUtils {
/**
* Listを指定したサイズ毎に分割します。
*
* @param origin 分割元のList
@urschrei
urschrei / parseml.py
Last active June 12, 2025 08:54
Extract attachments from EML files in the current dir, and write them to the output subdir. Now with recursion and robust filename handling
#!/usr/bin/env python3
"""
2025 update:
- Recursive extraction from nested EML files
- Robust filename handling with sanitization and deduplication
- Proper logging instead of print statements
- Enhanced error handling and validation
- Binary file reading for better encoding support
- Cross-platform filename compatibility
@csusbdt
csusbdt / index.html
Created January 13, 2013 16:56
How to store JSON data into the user's Google drive storage.
<html>
<head>
<!--
In this example, I started with the 5-minute example provided by Google
on the following page:
https://developers.google.com/drive/
I modified the example code, so that I could write the following
@Gab-km
Gab-km / github-flow.ja.md
Last active April 23, 2025 04:19 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)