$ brew install rsync
$ /usr/local/opt/rsync/bin/rsync -az --info=progress2 ~/.ghq user@host:
$ /usr/local/opt/rsync/bin/rsync -az --info=progress2 ~/.ivy2 user@host:
$ /usr/local/opt/rsync/bin/rsync -az --info=progress2 ~/.sbt user@host:
$ scp -p .zsh_history user@host:
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
import java.security.Permission | |
import org.scalatest.{BeforeAndAfter, Suite} | |
final class ExitPreventionException(val status: Int) | |
extends SecurityException(s"System.exit($status) is called") | |
trait ExitPrevention extends BeforeAndAfter { self: Suite => | |
before { | |
ExitPrevention.begin() |
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
FROM openjdk:8-jdk | |
ENV JAVA_OPTS -XX:MaxRAMFraction=1 -XX:MinRAMFraction=1 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap | |
RUN echo 'deb http://dl.bintray.com/sbt/debian /' > /etc/apt/sources.list.d/sbt.list \ | |
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823 \ | |
&& apt-get update \ | |
&& apt-get -y sbt \ | |
&& mkdir /tmp/x \ | |
&& cd /tmp/x \ |
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
// from https://github.com/sbt/sbt/issues/3841#issuecomment-355794813 | |
jlineWorkarounds | |
def jlineWorkarounds = Def.settings( | |
Seq( | |
console in Compile, | |
console in Test, | |
consoleProject in Compile, | |
consoleProject in Test, | |
) map { key => |
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
import java.text.MessageFormat | |
import java.util.ResourceBundle | |
import org.openqa.selenium.WebDriver | |
import org.openqa.selenium.chrome.{ChromeDriver, ChromeOptions} | |
import org.scalatestplus.play.BrowserFactory | |
import org.scalatestplus.play.BrowserFactory.UnavailableDriver | |
trait HeadlessChromeFactory extends BrowserFactory { | |
def createWebDriver(): WebDriver = |
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
function repo() { | |
local selected | |
selected=$(ghq list --full-path | grep "$1" | peco --query="$1" --select-1) | |
test -n "${selected}" && cd "${selected}" | |
} | |
function _repo() { | |
_values $(ghq list --unique) | |
} | |
compdef _repo repo |
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
<?xml version="1.0"?> | |
<root> | |
<devicevendordef> | |
<vendorname>Lenovo</vendorname> | |
<vendorid>0x17ef</vendorid> | |
</devicevendordef> | |
<deviceproductdef> | |
<productname>ThinkPad_Compact_USB_Keyboard_with_TrackPoint</productname> | |
<productid>0x6047</productid> |
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
aws ec2 modify-instance-attribute --instance-id INSTANCE_ID --block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"DeleteOnTermination":false}}]' |
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
;; based on https://github.com/emacs-jp/migemo | |
(defun ag-migemo (regexp directory) | |
"Search using ag in a given DIRECTORY for a given migemo-ized REGEXP." | |
(interactive (list (read-from-minibuffer "[MIGEMO] Search regexp: " "") | |
(read-directory-name "Directory: "))) | |
(let* ((ag-highlight-search nil) | |
(ag-arguments (list "--line-number" "--ignore-case" "--nogroup" "--column" "--")) | |
(buffer (get-buffer-create " *ag-migemo*")) | |
(process (start-process "ag-migemo" buffer migemo-command "-q" "-d" migemo-dictionary)) | |
(pattern (with-current-buffer (process-buffer process) |
NewerOlder