This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# icloudに格納したメモ帳をテキストファイルとしてダウンロードする | |
# ファイル名は、[更新日付-タイトル.txt] | |
require 'mail' | |
require 'cgi' | |
account = '(ユーザ名)@me.com' | |
pass = '(パスワード)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.ryoasai; | |
import static org.hamcrest.CoreMatchers.*; | |
import static org.junit.Assert.*; | |
import java.lang.reflect.Method; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## call git init | |
git init | |
## make .gitignore | |
cat > .gitignore << EOF | |
# Mac OS X Finder and whatnot | |
.DS_Store | |
# no useful files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Apache HttpComponents HttpClient Get | |
import java.io.{ File, IOException } | |
import java.net.{ URI, UnknownHostException, URLDecoder } | |
import org.apache.http.impl.client.DefaultHttpClient | |
import org.apache.http.client.methods.HttpGet | |
import org.apache.http.{ HttpResponse, HttpEntity, HttpStatus } | |
import org.apache.http.util.EntityUtils | |
import org.apache.commons.io.{ FileUtils, FilenameUtils } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find text in files | |
find | xargs grep 'text to find' -l | |
# Find and exec command | |
find -name '*.bak' -exec rm {} \; | |
# Find only dirs | |
find -type d | |
# Find only files |