Skip to content

Instantly share code, notes, and snippets.

@gakuzzzz
gakuzzzz / 1_.md
Last active June 30, 2016 21:58
Skinny Framework ハンズオン Q&A

Skinny Framework ハンズオンで出た質問と回答

IDE の Debugger どうやったら使えるの?

ハンズオン中はごめんなさいをするしかなかったのですが、 Skinny Framework 1.0.6 から使えるようになりました!

$ ./skinny debug [port]
@miyamoto-daisuke
miyamoto-daisuke / vpc-knowhow-2014-04.template
Last active October 20, 2020 07:02
VPC knownhow 2014-04
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "VPC knowhow template",
"Parameters": {
"KeyName": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type": "String",
"MinLength": "1",
"MaxLength": "64",
"AllowedPattern": "[-_ a-zA-Z0-9]*",
@gakuzzzz
gakuzzzz / 1_.md
Last active March 7, 2025 06:35
Scala の省略ルール早覚え

Scala の省略ルール早覚え

このルールさえ押さえておけば、読んでいるコードが省略記法を使っていてもほぼ読めるようになります。

メソッド定義

def concatAsString(a: Int, b: Int): String = {
  val a_ = a.toString();
  val b_ = b.toString();
@TravelingTechGuy
TravelingTechGuy / ChromeExtensionGulp.js
Created April 5, 2014 19:22
Gulp file for building a Chrome Extension
'use strict';
//npm install gulp gulp-minify-css gulp-uglify gulp-clean gulp-cleanhtml gulp-jshint gulp-strip-debug gulp-zip --save-dev
var gulp = require('gulp'),
clean = require('gulp-clean'),
cleanhtml = require('gulp-cleanhtml'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
stripdebug = require('gulp-strip-debug'),
val printUpdatedAllModules = TaskKey[Unit]("printUpdatedAllModules")
printUpdatedAllModules := {
update.value.allModules foreach println
}
libraryDependencies += "com.typesafe.play" %% "play-json" % "2.2.2"
@taisukeoe
taisukeoe / UIDemoActivity.scala
Last active April 16, 2017 05:01
How to force to execute Future callback function in Android UIThread.
import scala.concurrent._
import ExecutionContext.Implicits.global
import android.util.Log
import android.widget.TextView
class UIDemoActivity extends Activity {
override def onCreate(bundle: Bundle) {
super.onCreate(bundle)
val tv = new TextView(this)
@leon
leon / Grunt.scala
Last active September 3, 2016 02:23
Playframework 2.2 Grunt Runner
import sbt._
import Keys._
import java.net._
import java.io.File
import play.PlayRunHook
/*
Grunt runner should be in project directory to be picked up by sbt
*/
object Grunt {
package main
import (
"bufio"
"errors"
"io"
"log"
"net"
"net/http"
"net/url"
@aras-p
aras-p / preprocessor_fun.h
Last active May 16, 2025 11:21
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@geetchandratre
geetchandratre / play_scala_jade
Created June 4, 2013 12:24
Play 2.x + SBT + Scala + Jade
All you need to do is,
In your SBT Dependencies add,
"de.neuland" % "jade4j" % "0.3.11" from "https://raw.github.com/neuland/jade4j/master/releases/de/neuland/jade4j/0.3.11/jade4j-0.3.11.jar",
"com.googlecode.concurrentlinkedhashmap" % "concurrentlinkedhashmap-lru" % "1.3.1",
"org.apache.commons" % "commons-jexl" % "2.1.1"
You need apache libs as Jade4J uses them internally,