Skip to content

Instantly share code, notes, and snippets.

View equinox79's full-sized avatar

Jun-ichiro Suzuki equinox79

View GitHub Profile
@equinox79
equinox79 / フォルダ内のdocxからpdf生成(pdfないものだけ)※右クリックして「Powershellで実行」.ps1
Created November 24, 2021 06:49
フォルダ内のdocxからpdf生成(pdfないものだけ)※右クリックして「Powershellで実行」
$word = NEW-OBJECT -COMOBJECT WORD.APPLICATION
Write-Host "[フォルダ内のdocxからpdfを生成します]"
$files = Get-ChildItem | Where-Object{$_.Name -match "docx$"}
Write-Host "[変換開始]"
foreach($file in $files)
{
try
{
$result = (Test-Path $file.FullName.Replace(".docx",".pdf"))
javascript:(function()%7B(function()%7Bdocument.querySelector(%22.a-color-price%22).textContent%20%2B%3D%22%EF%BD%9C%E7%A8%8E%E6%8A%9C%E3%81%8D%3A%20%22%20%2B%20Math.round(%20document.querySelector(%22.a-color-price%22).textContent.replace(%2F%5B%5E0-9%5D%2Fg%2C%20'')%20%2F%201.08%20)%20%2B%20%22%E5%86%86%22%7D)()%7D)()
@equinox79
equinox79 / fabfile.py
Created June 28, 2014 08:40
fabric sample
from fabric.api import *
env.user = 'vagrant'
env.password = 'vagrant'
# enable .ssh/config
#env.use_ssh_config = True
def develop():
env.hosts = ['localhost', '127.0.0.1' ]
@equinox79
equinox79 / chrome-ext-repo.pl
Created March 29, 2014 17:15
chrome拡張のユーザ数をImKayacで通知するスクリプト
#!/usr/bin/env perl
use strict;
use warnings;
use Web::Query;
use WebService::ImKayac::Simple;
use Log::Minimal;
# 自分のImKayacのアカウント
def run_periodic
until @finished
begin
sleep @receive_interval
@queue.receive_message do |message|
record = {}
record[:body] = message.body.to_s
record[:handle] = message.handle.to_s
record[:id] = message.id.to_s
record[:md5] = message.md5.to_s
@equinox79
equinox79 / stack_trace.txt
Created February 21, 2014 09:38
in_sqsがコケた時のスタックトレース
2014-02-20 20:25:16 +0900 [warn]: emit transaction failed error_class=NoMethodError error=#<NoMethodError: undefined method `/' for 2014-02-20 20:25:16 +0900:Time>
2014-02-20 20:25:16 +0900 [warn]: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.41/lib/fluent/output.rb:515:in `block in emit'
2014-02-20 20:25:16 +0900 [warn]: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.41/lib/fluent/event.rb:54:in `call'
2014-02-20 20:25:16 +0900 [warn]: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.41/lib/fluent/event.rb:54:in `each'
2014-02-20 20:25:16 +0900 [warn]: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.41/lib/fluent/output.rb:513:in `emit'
2014-02-20 20:25:16 +0900 [warn]: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.41/lib/fluent/match.rb:36:in `emit'
2014-02-20 20:25:16 +0900 [warn]: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.41/lib/fluent/engine.rb:151:in `emit_stream'
2014-02-20 20:25:16 +0900 [war
@equinox79
equinox79 / output_emit.rb
Last active August 29, 2015 13:56
fluentdのin_sqsプラグインを動かすとここでコケる
def emit(tag, es, chain)
@emit_count += 1
es.each {|time,record|
tc = time / @time_slice_cache_interval // ここでコケる
if @before_tc == tc
key = @before_key
else
@before_tc = tc
key = @time_slicer.call(time)
@before_key = key
@equinox79
equinox79 / fluentd-casual-talks-3.md
Created December 13, 2013 16:15
Fluentd Casual Talks #3

19:00-19:10 開始

19:10-19:20 @tagomoris norikraの話

  • before
    • numeric_monitor
    • 再起動がいる
  • after
@equinox79
equinox79 / inst.txt
Created December 6, 2013 04:22
dev-box-install-memo
sudo yum -y git vim
@equinox79
equinox79 / install-ansible.sh
Created December 6, 2013 04:19
install ansible(CentOS)
sudo rpm -ivh http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
sudo yum -y install ansible