Skip to content

Instantly share code, notes, and snippets.

@koyopro
koyopro / amazon-calc.js
Last active April 2, 2022 08:23 — forked from polamjag/amazon-calc.js
Amazonで一年間に使った金額と、注文履歴のTSVを出力するブックマークレット【2015年版】
// Amazonの注文履歴をTSV形式で出力するスクリプト
//
// 2015-01-01 時点での DOM 構造に対応, GoogleCrome, Opera でテスト済。
// formatEntry関数を書き換えれば自由な書式で出力できます。
//
// 参考:
// - Amazonの注文履歴をCSV形式にして出力するスクリプト
// https://gist.github.com/arcatdmz/8500521
// - Amazon で使った金額の合計を出す奴 (2014 年バージョン)
// https://gist.github.com/polamjag/866a8af775c44b3c1a6d
@penguin2716
penguin2716 / auto_retweet_previous_tweet.rb
Created December 23, 2014 18:09
「いまのなし」ってつぶやいた人の直前のツイートをRTするmikutterプラグイン
# -*- coding: utf-8 -*-
Plugin.create :auto_retweet_previous_tweet do
tweet_before = {}
on_appear do |ms|
ms.each do |m|
if tweet_before[m.user]
tweet_before[m.user].retweet if m.to_s == "いまのなし"
anonymous
anonymous / naniittenda_koitu.rb
Created October 16, 2014 14:26
Twitterには何言ってんだこいつボタンが必要
Plugin.create :naniittenda_koitu do
command(:naniittenda_koitu,
name: '何言ってんだこいつ',
condition: lambda{ |opt| opt.messages.size == 1 },
visible: true,
role: :timeline) do |opt|
Service.primary.post message: "何言ってんだこいつ #{opt.messages.first.parma_link}"
end
end
@exoego
exoego / 転職先に訊きたいチェックリスト.md
Last active April 16, 2023 03:57
転職活動してて訊きたいことのメモ

制度

  • 有休…
  • 病休…
  • 育休…
  • 年収(月給、賞与など)…
  • 残業代…
  • 早朝/深夜手当…
  • 休出手当…
  • 住宅補助…
@tumugin
tumugin / misakura.rb
Created May 20, 2014 15:54
みしゃくら語に変換しゅるのぉおおプラグインにゃのぉおおれしゅぅぅぅ
def AheGaoDoublePeace(text)
str = text
str = str.gsub(/(気持|きも)ちいい/,'ぎも゛ぢい゛い゛ぃ')
str = str.gsub(/(大好|だいす)き/,'らいしゅきいぃっ')
str = str.gsub(/(ミルク|みるく|牛乳)/,'ちんぽミルク')
str = str.gsub(/お(願|ねが)い/,'お願いぃぃぃっっっ゙')
str = str.gsub(/ぁ/,'ぁぁ゛ぁ゛')
str = str.gsub(/あ/,'ぁあああ あぉ')
str = str.gsub(/お/,'お゙ぉおォおん')
str = str.gsub(/ごきげんよう/,'ごきげんよぉおお!んおっ!んおおーーっ! ')
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@geta6
geta6 / catimg(bash)
Last active January 23, 2016 22:35
cat image on xterm256 terminal, zsh or bash
#!/bin/bash
# Modified by Yu-Jie Lin for Bash from zsh version
ORG="$1"
if [[ ${ORG##*.} =~ JPG|jpg|JPEG|jpeg|GIF|gif|PNG|png ]]; then
CATWIDTH=$(tput cols)
SRC=$(mktemp).png
@CLCL
CLCL / CentOS6-L2TP-IPsec.md
Last active September 26, 2022 18:21
L2TP/IPsec(AndroidやiPhoneからのVPN接続)を経路を用意すべくVPSにL2TP/IPsecサーバを設置するとき、ネットにある情報だとなかなかつながらないから、標準環境としてAWSのCentOS 6.3 x86_64 Release Media(ami-3fe8603e)の起動直後から最短距離で設定する方法をまとめた。

CentOS 6でとにかくL2TP/IPsecサーバ

  • AWSでEC2のインスタンスを借りる
  • 今回は東京リージョンのCentOS 6.3 x86_64 Release MediaのAIM(ami-3fe8603e)でインスタンスを建てる
  • Security Group: L2TP/IPsec(Inbound 22/TCP: SSH, 500/UDP: ISAKMP, 1701/UDP: L2TP, 4500/UDP: IPSec NAT Traversal)を許可
  • ec2-54-249-173-214.ap-northeast-1.compute.amazonaws.com(グローバルIPアドレス:54.249.173.214)にrootでログイン

SELinuxを無効にする

[root@ip-10-132-164-105 ~]# setenforce 0
@satomacoto
satomacoto / create.py
Last active December 15, 2022 10:34
kNN on xvideos.com-db.csv
# -*- coding:utf-8 -*-
from pymongo import MongoClient
client = MongoClient()
db = client.xvideos
def create_db():
f = open('xvideos.com-db.csv')
for line in f:
@penguin2716
penguin2716 / aieeeee.rb
Created March 6, 2013 17:07
どんなツイートも「アイエエエエエ!」になっちゃうmikutterプラグイン
#-*- coding: utf-8 -*-
Plugin.create :aieeeee do
filter_gui_postbox_post do |gui_postbox|
Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text = "アイエエエエエ!#{' ' * rand(30)}"
[gui_postbox]
end
end