Skip to content

Instantly share code, notes, and snippets.

@conf8o
conf8o / ast.fsx
Last active July 1, 2022 11:22
AST
type Val =
| Int of int
| Bool of bool
type Ope = Add | Mul | Lt
type Ast =
| Val of Val
| Form of Ope * Ast * Ast
let exec ope v1 v2 =
match ope, v1, v2 with
(ns bakusatsu
(:refer-clojure :exclude [+ -])
(:require [clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as stest]
[clojure.core :as core]))
;; 金額に関する振る舞い(金額同士の加算と減算ができる)
(defprotocol IMoney
(+ [this money])
(- [this money]))
@kawasima
kawasima / SPEC.md
Last active October 16, 2017 08:53
Bouncrの仕様

Bouncrとは

Bouncrは認証・認可の機能を備えたリバースプロキシです。

Architecture

機能

リバースプロキシ

@autumnwoodberry
autumnwoodberry / user.js
Last active March 24, 2022 06:49
vuex + vuelidate
import Vue from 'vue'
import { validationMixin } from 'vuelidate'
import { required, minLength } from 'vuelidate/lib/validators'
export default function (store) {
const validator = new Vue({
mixins: [
validationMixin
],
computed: {
@zentrope
zentrope / number-format.cljs
Created December 22, 2016 03:07
A comma for thousands separator in Clojurescript using goog closure libs.
(ns client.ui
(:require
[goog.i18n.NumberFormat.Format])
(:import
(goog.i18n NumberFormat)
(goog.i18n.NumberFormat Format)))
(def nff
(NumberFormat. Format/DECIMAL))
@mitsuruog
mitsuruog / index.md
Last active April 15, 2024 00:54
express実践入門

express実践入門


自己紹介

小川充

  • mitsuruog
@chadrien
chadrien / README.md
Last active July 18, 2024 08:31
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@bostonou
bostonou / promise.cljs
Created July 14, 2015 01:14
Promise.all with core.async
(ns cljs-made-easy.core
(:refer-clojure :exclude [into])
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [cljs.core.async :refer [<! >!] :as a]))
(enable-console-print!)
(defn resolving-promise [key t reject]
(go
(pr (str key " starting"))
@mizchi
mizchi / フロントエンドを楽にするために.md
Last active December 14, 2023 11:57
フロントエンドを楽にするために

フロントエンドを楽にするために

Qiitaを支えたい技術 at 時雨祭

About

  • HN: mizchi
  • Qiitaの方からきました(入社半年たったらしい)
  • Reactオジサンはそろそろ飽きてきた
  • Angularに興味が無いのでこっちにきた
@jjwatt
jjwatt / coolquery.clj
Last active September 7, 2019 09:37
core.async database query fn
(ns
#^{:author "Jesse Wattenbarger"
:doc "pulled out of a production program for gist."}
coolquery.core
(:gen-class)
(:require [clojure.java.io :as io]
[clojure.core.async :as a :refer
[chan go go-loop close! <!! <! >! >!!]]
[jdbc.core :as jdbc] ;; good jdbc interop
))