Skip to content

Instantly share code, notes, and snippets.

@harupong
harupong / gist:46fb8b4d8dd5825d7aa653a719087d1f
Created Sep 11, 2018
Quick and dirty PowerShell script to dedupe Google photos using rclone
View gist:46fb8b4d8dd5825d7aa653a719087d1f
$paths = @(
"google-drive:Google Photos\path1",
"google-drive:Google Photos\path2",
"google-drive:Google Photos\path3",
)
$paths | ForEach-Object -Process {
echo $_ ; .\rclone lsf $_ | Measure-Object –Line ; if($?) {.\rclone dedupe --dedupe-mode largest $_}
}
@harupong
harupong / five_minutes.yml
Created Feb 26, 2016 — forked from ryane/five_minutes.yml
five_minutes.yml
View five_minutes.yml
---
- hosts: all
vars:
UBUNTU_COMMON_ROOT_PASSWORD: 'xxxxx'
UBUNTU_COMMON_DEPLOY_PASSWORD: 'xxxxx'
UBUNTU_COMMON_LOGWATCH_EMAIL: user@example.com
ubuntu_common_deploy_user_name: deploy
ubuntu_common_deploy_public_keys:
- ~/.ssh/id_rsa.pub
@harupong
harupong / gist:2340e3d6fd380fc4d3a5
Last active Jan 5, 2016
crude one-liner to dowload latest GitBucket war file from GitHub
View gist:2340e3d6fd380fc4d3a5
wget https://github.com/gitbucket/gitbucket/releases/download/$(curl -s https://api.github.com/repos/gitbucket/gitbucket/releases/latest | grep -Po '(?<="tag_name": ")[^"]*')/gitbucket.war -O gitbucket.war
@harupong
harupong / ansible_ripdiko.md
Last active Aug 29, 2015
Ansible で遊ぼう
View ansible_ripdiko.md

TODO

linode-cli 用の apt-repo 追加で失敗する

2014-04-13 17:30 くらいの ansible.log を確認してみよう

ansible-playbook の GATHERING FACTS で SSH エラーが出た場合の検知と対応方法を探す

2014-04-13 00:31:21,448 p=2608 u=ubuntu |  PLAY [all] ********************************************************************
@harupong
harupong / error.log
Created Feb 10, 2014
progit/makepdfs ja error log
View error.log
$ /bin/bash makepdfs ja
Will generate pdf for the following languages:
ja
The generation process will start now.
ja:
Parsing markdown... done
Creating main.tex for ja... Exception `Errno::EEXIST' at /usr/lib/ruby/1 .9.1/fileutils.rb:247 - File exists - /home/vagrant/projects/progit-ja/latex/ja
done
Running XeTeX:
@harupong
harupong / box_file_sender.rb
Last active Aug 29, 2015
Linux サーバー上で1日1つ生成されるファイルを Box に自動アップロードする
View box_file_sender.rb
# coding: utf-8
# based on http://pgnote.net/?p=1842
require 'mail'
attachment = ARGV.shift
Mail.defaults do
delivery_method :smtp, {
:address => "<Server-Address>",
View -
tmux and mouse mode - Dan Lowe http://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode/
tmux - Line wrap problems in Mac OS X terminal? http://comments.gmane.org/gmane.comp.terminal-emulators.tmux.user/651
-> http://stackoverflow.com/questions/2119942/how-to-wrap-git-commit-comments/6697519#6697519
-> git log -p した画面で ←→
View -
pandoc 1.11.1
Compiled with citeproc-hs 0.3.8, texmath 0.6.1.3, highlighting-kate 0.5.3.8.
Syntax highlighting is supported for the following languages:
actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
fortran, fsharp, gnuassembler, go, haskell, haxe, html, ini, java, javadoc,
javascript, json, jsp, julia, latex, lex, literatecurry, literatehaskell,
lua, makefile, mandoc, matlab, maxima, metafont, mips, modula2, modula3,
monobasic, nasm, noweb, objectivec, objectivecpp, ocaml, octave, pascal,
View curl.md

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin