Skip to content

Instantly share code, notes, and snippets.

@Yasushi
Yasushi / - IDE Scripting.md
Last active April 6, 2024 06:23 — forked from gregsh/- IDE Scripting.md
IDE Scripting

Here are my attempts to script an IntelliJ-based IDE using javax.script.* API (ex-JSR-223).

The list of available scripting languages and engines:

  1. Groovy - built-in, via Groovy jars and <app>/lib/groovy-jsr223-xxx.jar
  2. JavaScript (Nashorn) - built-in, via Java Runtime <app>/jbr/... (deprecated and will be removed soon)
  3. JavaScript (GraalJS) - https://plugins.jetbrains.com/plugin/12548-intellij-scripting-javascript
  4. JPython - https://plugins.jetbrains.com/plugin/12471-intellij-scripting-python
  5. JRuby - https://plugins.jetbrains.com/plugin/12549-intellij-scripting-ruby
  6. Clojure - https://plugins.jetbrains.com/plugin/12469-intellij-scripting-clojure
@Yasushi
Yasushi / mingw-w64.sh
Last active March 27, 2016 02:12 — 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
#!/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
@Yasushi
Yasushi / ddskk.rb
Last active August 29, 2015 14:10 — forked from kawaguchi/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 02:26 — forked from kmizu/build.sbt
Code snippet of build.sbt for Finagle 4.0.2 in Scala 2.9.1
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 15:10 — forked from ReSTARTR/RameeProject.scala
DotCloud sbt Project sample
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 April 30, 2011 14:38 — forked from retronym/mvn2sbt.scala
mvn2sbt: quick hack to turn <dependencies> into SBT
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>
@Yasushi
Yasushi / pom.xml
Created February 14, 2011 09:34 — forked from tc/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>
@Yasushi
Yasushi / twixy.py
Created January 25, 2010 05:18 — forked from mizchi/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
#
/*
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"
// 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 {