View PgTCPListener.cs
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
using System.Net; | |
using System.Net.Sockets; | |
using System.Text; | |
namespace PgWire; | |
class PgBuffer | |
{ | |
// private NetworkStream _stream; | |
// |
View index.ts
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 { | |
JupyterFrontEnd, | |
JupyterFrontEndPlugin, | |
ILabShell | |
} from '@jupyterlab/application'; | |
import { Widget } from '@lumino/widgets'; | |
/** | |
* Initialization data for the jupyterlab-sidepanel extension. |
View czmq_const.erl
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
-module(czmq_const). | |
-compile(export_all). | |
-include_lib("czmq/include/czmq.hrl"). | |
zmq_pair() -> | |
?ZMQ_PAIR. | |
zmq_pub() -> | |
?ZMQ_PUB. |
View Scheduler.ex
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
defmodule Scheduler do | |
def get_best_pid(group) do | |
mems = :pg2.get_members(group) |> | |
Enum.map(fn(pid) -> | |
[message_queue_len: msgs, stack_size: ss] = :rpc.pinfo(pid, [:message_queue_len, :stack_size]) | |
{pid, msgs, ss} | |
end) |> | |
Enum.sort(fn ({_, q1, s1}, {_, q2, s2}) -> q1 < q2 or (q1 == q2 and s1 < s2) end) | |
case mems do | |
[{pid, _, _} | _] -> pid |
View gist:314831f9794f351b0ba2
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
Unexpected exception in Clojure verticle | |
java.lang.RuntimeException: No such var: eb/on-message, compiling:(clojure/YYYY/XXXX.clj:62:1) | |
at clojure.lang.Compiler.analyze(Compiler.java:6464) | |
at clojure.lang.Compiler.analyze(Compiler.java:6406) | |
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3665) | |
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6646) | |
at clojure.lang.Compiler.analyze(Compiler.java:6445) | |
at clojure.lang.Compiler.analyze(Compiler.java:6406) | |
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782) | |
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5217) |
View insert_data.sql
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
-- | |
-- PostgreSQL database dump | |
-- | |
SET statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; |
View package.mk.diff
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
--- a/package.mk | |
+++ b/package.mk | |
@@ -3,6 +3,7 @@ DO_NOT_GENERATE_APP_FILE:=true | |
UPSTREAM_GIT:=git://github.com/elixir-lang/elixir.git | |
UPSTREAM_REVISION:=master | |
+UPSTREAM_TAG:=v0.12.0 | |
RETAIN_ORIGINAL_VERSION:=true | |
ORIGINAL_APP_FILE=$(CLONE_DIR)/src/$(APP_NAME).app.src |
View do-package.mk.diff
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
--- a/do-package.mk Tue Apr 15 13:11:24 2014 +0100 | |
+++ b/do-package.mk Wed Apr 23 09:12:18 2014 +0100 | |
@@ -233,6 +233,7 @@ | |
# Work around weird github breakage (bug 25264) | |
cd $(CLONE_DIR) && git pull | |
$(if $(UPSTREAM_REVISION),cd $(CLONE_DIR) && git checkout $(UPSTREAM_REVISION)) | |
+ $(if $(UPSTREAM_TAG),cd $(CLONE_DIR) && git checkout tags/$(UPSTREAM_TAG)) | |
$(if $(WRAPPER_PATCHES),$(foreach F,$(WRAPPER_PATCHES),patch -d $(CLONE_DIR) -p1 <$(PACKAGE_DIR)/$(F) &&) :) | |
touch $$@ | |
endif # UPSTREAM_GIT |
View server.ex
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
defmodule Tcprpc.Server do | |
use GenServer.Behaviour | |
defrecord State, port: nil, lsock: nil, request_count: 0 | |
def start_link(port) do | |
:gen_server.start_link({ :local, :tcprcp }, __MODULE__, port, []) | |
end | |
def start_link() do |
View core.cljs
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
(ns calc.core | |
(:require [dommy.core :as dom] | |
[cljs.core.async :refer [>! <! chan put!]]) | |
(:require-macros [cljs.core.async.macros :refer [alt! go-loop]]) | |
(:use-macros [dommy.macros :only [sel sel1]])) | |
(defn setup [id] | |
(let [el (sel1 id) | |
out (chan) |
NewerOlder