Skip to content

Instantly share code, notes, and snippets.

View augustl's full-sized avatar

August Lilleaas augustl

  • Oslo, Norway
View GitHub Profile
class MyDraggable extends StatefulWidget {
final Widget child;
final Widget childWhenDragging;
final Widget feedback;
final VoidCallback onDragEnd;
MyDraggable({
@required this.child,
@required this.childWhenDragging,
@required this.feedback,
this.onDragEnd
@augustl
augustl / code.rs
Last active December 9, 2018 19:15
pub fn init_idt(
) {
// IDT.load();
}
extern "x86-interrupt" fn breakpoint_handler(
stack_frame: &mut x86_64::structures::idt::ExceptionStackFrame
) {
// println!("EXCEPTION: BREAKPOINT\n{:#?}", stack_frame);
}
$> tsc src/foo.ts
src/foo.ts:29:20 - error TS2339: Property 'length' does not exist on type 'string | {}'.
Property 'length' does not exist on type '{}'.
18 new Foo("wot").x().length
~~~~~~
UNWIND {legs} as pair
MATCH (stopA:TdefPos)--(stopB:TdefPos)
WHERE
(stopA.logicalTrainId = stopB.logicalTrainId)
AND
(stopA.stopId = pair[0] AND stopB.stopId = pair[1])
RETURN stopA.trainId as trainId, stopA.itineraryId as itineraryId, stopA.periodId as periodId
(let [items-by-month (group-by get-month items)]
(mapcat (fn [month] (sort-by get-date (get items-by-month month)))
(sort (keys items-by-month))))
(ns huffda.expectations-basics-test
(:require [clojure.test :refer [deftest testing is async]]
[huffda.expectations :as expec]
[cljs.core.async :refer [chan <! >! put! close! alts! timeout promise-chan]])
(:require-macros [cljs.core.async.macros :refer [go go-loop]]))
(defmacro async-test [name & form]
`(testing name
(async done
(do ~@form)
(ns huffda.expectations-basics-test
(:require [clojure.test :refer [deftest testing is async]]
[huffda.expectations :as expec]
[cljs.core.async :refer [chan <! >! put! close! alts! timeout promise-chan]])
(:require-macros [cljs.core.async.macros :refer [go go-loop]]))
(defmacro async-test [& form]
`(async done
(go
(do ~@form)
@augustl
augustl / core.txt
Created November 25, 2017 23:03
boxstarter
Disable-UAC
Disable-BingSearch
Disable-GameBarTips
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions
Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -Lock
Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -AlwaysShowIconsOn
@augustl
augustl / test.cljs
Last active November 22, 2017 21:27
;; [org.clojure/clojure "1.8.0"]
;; [org.clojure/clojurescript "1.9.946"]
;; [org.clojure/core.async "0.3.465"]
(ns huffda.expectations-basics-test
(:require [clojure.test :refer [deftest testing is async]]
[huffda.expectations :as expec]
[cljs.core.async :refer [chan <! >! put! close! alts! timeout promise-chan]])
(:require-macros [cljs.core.async.macros :refer [go go-loop]]))
package no.nsb.altrans.gui.homeless
import javax.servlet.Filter
import javax.servlet.FilterChain
import javax.servlet.FilterConfig
import javax.servlet.ServletContext
import javax.servlet.ServletException
import javax.servlet.ServletRequest
import javax.servlet.ServletResponse
import javax.servlet.http.HttpServletRequest