This file contains hidden or 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
Generating autoloads for inf-haskell.el...done | |
Generating autoloads for w3m-haddock.el... | |
Generating autoloads for w3m-haddock.el...done | |
Saving file /home/wfaler/.emacs.d/el-get/haskell-mode/haskell-mode-autoloads.el... | |
Wrote /home/wfaler/.emacs.d/el-get/haskell-mode/haskell-mode-autoloads.el | |
(No changes need to be saved) | |
sed -e 's/@@GIT_VERSION@@/13.10-77-g35527f9/g;s/@GIT_VERSION@/13.10-77-g35527f9/g;s/@@VERSION@@/13.10/g;s/@VERSION@/13.10/g' < haskell-mode.texi > haskell-mode.tmp.texi | |
makeinfo -o haskell-mode.info haskell-mode.tmp.texi | |
make: makeinfo: Command not found | |
make: *** [haskell-mode.info] Error 127 |
This file contains hidden or 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 scala.slick.jdbc.{GetResult, StaticQuery => Q} | |
case class FooCount(n: String, c: Int) | |
implicit val getStatusCountResult = GetResult(r => Foo(r.nextString, r.nextInt)) | |
val q = Q.queryNA[FooCount]("SELECT foo, count(foo) FROM bar GROUP BY foo") |
This file contains hidden or 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
- name: ensure postgres key is present | |
action: apt_key id=ACCC4CF8 state=present url="https://www.postgresql.org/media/keys/ACCC4CF8.asc" |
This file contains hidden or 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
public final class ImmutableBean{ | |
public final String name; | |
public final Integer age; | |
public ImmutableBean(String name, Integer age){ | |
if(name == null || name.length < 1 || age == null || age < 0) | |
throw new IllegalArgumentException("name must be set and age must be 0 or over"); | |
this.name = name; |
This file contains hidden or 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
// how to decode case objects and UUID in the example below? Encoding works fine. | |
sealed trait Foo | |
case object Bar extends Foo | |
case object Baz extends Foo | |
case class SomeThing(uuid: UUID, foo: Foo) | |
implicit def SomeThingCodec = casecodec2(SomeThing.apply,SomeThing.unapply)("uuid", "foo") | |
implicit def UUIDEncodeJson = new EncodeJson[UUID]{ def encode(uuid: UUID) = jString(uuid.toString)} |
This file contains hidden or 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
M-x shell opens shell | |
C-x C-f open file | |
C-x C-c exit emacs | |
C-x C-k kill line after cursor | |
M-k kill sentence | |
M-d kill word | |
C-x Del kill previous sentence | |
C-g exit mini-buffer | |
C-space start marking text |
This file contains hidden or 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
apt-get update | |
apt-get upgrade | |
apt-get install python-software-properties | |
add-apt-repository ppa:cassou/emacs | |
add-apt-repository ppa:webupd8team/java | |
apt-get update | |
apt-get install emacs24 | |
apt-get install oracle-java7-installer |
This file contains hidden or 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
(require 'package) | |
(add-to-list 'package-archives | |
'("marmalade" . | |
"http://marmalade-repo.org/packages/")) | |
(package-initialize) | |
(load-theme 'solarized-dark t) | |
(global-set-key (kbd "M-3") '(lambda () (interactive) (insert "#"))) | |
This file contains hidden or 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
ctrl-b "Prefix", gets into command mode | |
ctrl-b w list tmux windows | |
ctrl-b [number] jumps to tmux window number | |
ctrl-b n go to next window | |
ctrl-b p go to previous window | |
ctrl-b & close current window | |
ctrl-b c new window | |
ctrl-b , rename window | |
ctrl-b f find window by name | |
ctrl-b % split window horizontally into two panes |
This file contains hidden or 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
TMPFILE="utf8.tmp" | |
cp $1 $TMPFILE | |
enc=`file -i $1 | awk 'BEGIN {FS = "="} ; {print $2; }'` # gets encoding of a file | |
iconv -f $enc -t utf-8 $TMPFILE > $1 # changes encoding to UTF-8 | |
rm $TMPFILE |