日時: | 2024-02-01 |
---|---|
作: | 時雨堂 |
資料 バージョン: | 2024.1 |
GitHub URL: | https://github.com/shiguredo/momo |
製品 URL: | https://momo.shiguredo.jp/ |
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
on setDarkMode(shouldBeDark) | |
set paneID to "com.apple.preference.general" | |
tell application "System Events" | |
if dark mode of appearance preferences is shouldBeDark then return | |
end tell | |
set paneWasOpen to 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
package bar.foo.lenses; | |
import java.util.function.BiFunction; | |
import java.util.function.Function; | |
public class Lens<A, B> { | |
private final Function<A, B> getter; | |
private final BiFunction<A, B, A> setter; |
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
;; Assume you have already installed Font Awesome on the system | |
;; http://fortawesome.github.io/Font-Awesome/ | |
(require 'ov) | |
;; Overlay Library | |
;; https://github.com/ShingoFukuyama/ov.el | |
;; Example 1: Insert all fonts at the cursor position | |
(defun font-awesome-insert-all () |
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 scala.reflect.macros.Context | |
import scala.util.matching.Regex | |
import java.util.regex.PatternSyntaxException | |
object Macros { | |
implicit class RegexContext(val c: String) { | |
def regex(): Regex = macro regexImpl | |
} | |
def regexImpl(c: Context)(): c.Expr[Regex] = { |
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
// ネタ元: | |
// 衝撃的なデータベース理論・関手的データモデル 入門 | |
// http://d.hatena.ne.jp/m-hiyama/20130211/1360577040 | |
//データ保持用 | |
object Strage { | |
trait Strage[A] { | |
def get: A | |
} | |
} |
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
package controllers; | |
import play.*; | |
import play.mvc.*; | |
import controllers.*; | |
import views.html.*; | |
import org.fusesource.scalate.japi.TemplateEngineFacade; | |
import java.util.HashMap; | |
import java.util.Map; |
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
package mymonad | |
import scala.language.postfixOps | |
import scala.util.continuations._ | |
import scala.util.control.NonFatal | |
sealed trait MyOption[+A] | |
case object MyNone extends MyOption[Nothing] |
NewerOlder