Skip to content

Instantly share code, notes, and snippets.

@Yasushi
Yasushi / mingw-w64.sh
Last active Mar 27, 2016 — forked from Drakulix/mingw-w64-3.10-osx10.9.sh
Script to install a Mingw-w64 Cross-Compiler Suite on Mac OS X 10.11
View mingw-w64.sh
#!/bin/sh
# dependencies
#echo "Installing dependencies via Homebrew (http://brew.sh)"
#ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
#brew update
#brew install gcc48
View ddskk.rb
require 'formula'
class Ddskk < Formula
url 'http://openlab.ring.gr.jp/skk/maintrunk/ddskk-15.2.tar.gz'
homepage 'http://openlab.ring.gr.jp/skk/index-j.html'
sha1 '23b7c83dfa4997a0be47fca8cfd316e68f4342ec'
patch do
url "https://gist.githubusercontent.com/Yasushi/d69a49dc3eb6780952c6/raw/21becd1e99864a1924786d481172855992452b08/ddskk-rename-queue-func.diff"
sha1 "ef07cb6707f33d46cc364afa8c1cb829d3670e14"
@Yasushi
Yasushi / build.sbt
Created May 19, 2012 — forked from kmizu/build.sbt
Code snippet of build.sbt for Finagle 4.0.2 in Scala 2.9.1
View build.sbt
resolvers += "twitter-repo" at "http://maven.twttr.com"
scalaVersion := "2.9.1"
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-http" % "4.0.2"
)
@Yasushi
Yasushi / RameeProject.scala
Created May 9, 2011 — forked from ReSTARTR/RameeProject.scala
DotCloud sbt Project sample
View RameeProject.scala
import sbt._
class AppnameProject(info: ProjectInfo) extends DefaultWebProject(info) {
val JETTY7 = "7.3.1.v20110307"
val servletapi = "javax.servlet" % "servlet-api" % "2.5" % "compile"
val jetty7Server = "org.eclipse.jetty" % "jetty-server" % JETTY7 % "provided,test"
val jetty7Servlets = "org.eclipse.jetty" % "jetty-servlets" % JETTY7 % "provided,test"
val jetty7Webapp = "org.eclipse.jetty" % "jetty-webapp" % JETTY7 % "provided,test"
@Yasushi
Yasushi / mvn2sbt.scala
Created Apr 30, 2011 — forked from retronym/mvn2sbt.scala
mvn2sbt: quick hack to turn <dependencies> into SBT
View mvn2sbt.scala
object scala {
val version = "SCALA_VERSION$"
}
val xml = <dependencies>
<dependency>
<groupId>org.scalanlp</groupId>
<artifactId>scalala_${scala.version}</artifactId>
<version>0.3.1</version>
</dependency>
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>casbah-test</groupId>
<artifactId>testing</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
<scala.version>2.8.1</scala.version>
View twixy.py
#!/usr/bin/python
#
# Copyright 2007 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
View hilite.scala
/*
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://sam.zoy.org/wtfpl/COPYING for more details.
Uses "http://www.hilite.me/api"
View Immutable domain model in Scala
// Sketch of an immutable domain model in Scala
// We used this scheme together with this JPA module:
// http://github.com/jboner/skalman/blob/d1e03a85be3964b9012f9e79dd726b0546342b2b/core/src/main/scala/JPA.scala
// ...and this GenericRepository:
// http://github.com/jboner/skalman/blob/d1e03a85be3964b9012f9e79dd726b0546342b2b/core/src/main/scala/GenericRepository.scala
abstract class Entity[T](val id: Int)
object User {
View copy.ubiq.js
const Aliases = {
t: {
help: 'title',
get text() info().title,
},
u: {
help: 'URL',
get text() info().url,
},
a: {