Skip to content

Instantly share code, notes, and snippets.

@eloo
eloo / node_exporter.default
Last active December 22, 2023 09:00
Init.d script for prometheus node exporter
# Set the command-line arguments to pass to the server.
ARGS='-web.listen-address=:9100 -collector.diskstats.ignored-devices="^(ram|loop|fd)\\d+$"'
# Prometheus-node-exporter supports the following options:
# -collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z])\\d+$": Regexp of devices to ignore for diskstats.
# -collector.filesystem.ignored-mount-points="^/(sys|proc|dev)($|/)": Regexp of mount points to ignore for filesystem collector.
# -collector.ipvs.procfs="/proc": procfs mountpoint.
# -collector.megacli.command="megacli": Command to run megacli.
# -collector.ntp.server="": NTP server to use for ntp collector.
# -collector.textfile.directory="": Directory to read text files with metrics from.
@akimasa
akimasa / _pt2-driverbug.md
Last active March 19, 2022 07:14
PT2ドライババグの注意喚起

この記事は DTV Advent Calendar 2016 6日目の記事です。

MirakurunにおけるPT2サポートは、現在開発中です。 プルリクエストがマージされて、リリースされ次第、使えるようになります。 2.0.0-beta.3では、まだPT2サポートは不十分で、chardev版pt1_drvのバグを回避できません。 今後リリースされるMirakurunのPT2サポートを利用することでchardev版pt1_drvのバグを回避することが可能です。

以下が本文になります。

PT1/2をご利用の方へ大切なお知らせとお願い

@sile
sile / 0_succ_bp.md
Last active July 17, 2023 23:57
簡潔データ構造やBalancedParenthesesの紹介資料メモ

発表資料メモ: 簡潔データ構造について

  1. 主題

  • 数千万オーダーの文字列集合(およびマップ)を如何にサイズ効率良く表現するか、の話
    • 諸事情で集合をメモリ上に保持したいことがあるが、サイズは節約したい
    • 実際にはサイズのみを追求するのではなく、諸々のトレードオフを加味しつつバランスを取る
  • 今回はそれを実現するための方法の一つである 簡潔データ構造 について説明する:
@konradko
konradko / golang_on_rpi.md
Last active April 12, 2020 17:36
Install Golang 1.7 on Raspberry Pi
wget https://storage.googleapis.com/golang/go1.7.linux-armv6l.tar.gz
tar -C /usr/local -xzf go1.7.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
@ntddk
ntddk / fx0.md
Last active June 20, 2023 06:17
国内版Fx0にAndroidをインストールする

必要なもの

  • Windowsがインストールされたマシン(Windows 10で動作確認済)

手順

  • Android SDKをインストールする
  • KingoRootをインストールする
  • Fx0をUSBケーブルでマシンにつなぐ
  • KingoRootを起動し,「ROOT」をクリック
  • 待つ
  • adb shellからsuする
@yutori
yutori / redis_cluster.md
Last active April 20, 2019 23:17
Redis Cluster のリシャーディングとorphaned masterの話 - CyberAgent エンジニア Advent Calendar 2014 2日目

Redis Cluster のリシャーディングとorphaned masterの話

(2019/04 追記 こちらの情報は非常に古く、またRC版での結果となります。記録として残していますが参考になさらないでください

CyberAgent エンジニア Advent Calendar 2014 2日目です。

昨日に引き続き、秋葉原ラボの柿島が担当します。仕事ではHadoopクラスタの運用を中心に、秋葉原ラボのインフラ/ミドルウェアまわりを担当しています。今年はHadoop、mesos、Aerospikeと分散型のシステムを触る機会が多い1年でした。

この記事のテーマはRedis Clusterです。Redis Clusterが使えるようになるRedis 3.0.0は10月にRC1がリリースされました。2015年のQ1にstableリリースを目指しているようです。

var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@tondol
tondol / nicovideo_rtmpe.md
Last active June 9, 2018 02:50
ニコニコ公式アニメポータルのrtmpeプロトコル動画をダウンロードする覚え書き

はじめに

http://www.nicovideo.jp/watch/1380872606

上記の動画を例にDL方法を解説する。

パラメータの取得

@taldanzig
taldanzig / osxvpnrouting.markdown
Created January 24, 2013 22:14
Routing tips for VPNs on OS X

Routing tips for VPNs on OS X

When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.

Specific cases

Case 1: conflicting additional routes.

In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:

@youzaka
youzaka / captiondumper.py
Created December 31, 2011 15:12
字幕ダンプ
#!/usr/bin/env python
import hashlib
from collections import defaultdict
from io import BufferedReader, FileIO
from aribgaiji import GAIJI_MAP
"""
TSファイルから字幕を取り出すスクリプト。