Devices:
Inspired by:
(use-modules (ice-9 format) (ice-9 popen) (ice-9 rdelim) (ice-9 regex) | |
((guix packages) #:select (package-file)) | |
((guix store) #:select (open-connection close-connection run-with-store)) | |
((gnu packages gnupg) #:select (gnupg pinentry-emacs))) | |
(define current-tty (ttyname (current-output-port))) | |
(define gpg-agent-description | |
(format #f "GnuPG PGP and SSH agent on ~a" current-tty)) |
#!/usr/bin/env -S guix repl -- | |
!# | |
;; dynamic version of /gnu/store/....-shepherd-.../bin/shepherd | |
;; here we want to run shepherd with guix guile, in order | |
;; to be able to use (use-modules (guix ...)) in our scripts | |
;; | |
;; Why: currently guix runs with guile-3.0.5, while stock | |
;; shepherd is provided with guile-3.0.2. When importing modules | |
;; guix, it gives tones of "bytecode incompatible" warnings |
(define-module (grub-latest) | |
#:use-module (guix build-system gnu) | |
#:use-module (guix build-system trivial) | |
#:use-module (guix download) | |
#:use-module (guix git-download) | |
#:use-module (guix licenses) | |
#:use-module (guix packages) | |
#:use-module (guix utils) | |
#:use-module (gnu packages) | |
#:use-module (gnu packages autotools) |
import 'zone.js/dist/zone' // Angular requirement | |
(window as any).enableRemoteLog = () => { | |
(window as any).originalConsole = console | |
const axios = import('axios') | |
console = (Object.keys(console) as (keyof Console)[]) | |
.map(k => | |
typeof console[k] === 'function' | |
? { | |
[k]: (...args: any[]) => { |
import { Observable, Observer, Subscription } from 'rxjs' | |
import { Operation, FetchResult, Observable as ApolloLinkObservable } from 'apollo-link' | |
import { SchemaLink } from 'apollo-link-schema' | |
// adapted copy of https://github.com/angular/angular/blob/master/packages/platform-server/src/http.ts | |
declare var Zone: any | |
type Task = any |
Devices:
Inspired by:
patch-package | |
--- a/node_modules/mongodb/lib/operations/collection_ops.js | |
+++ b/node_modules/mongodb/lib/operations/collection_ops.js | |
@@ -18,13 +18,12 @@ const handleCallback = require('../utils').handleCallback; | |
const indexInformationDb = require('./db_ops').indexInformation; | |
const isObject = require('../utils').isObject; | |
const Long = require('mongodb-core').BSON.Long; | |
-const makeLazyLoader = require('../utils').makeLazyLoader; | |
const MongoError = require('mongodb-core').MongoError; | |
const ReadPreference = require('mongodb-core').ReadPreference; |
// https://github.com/asarkar/algorithms-design-analysis-2/blob/master/data-structures/src/main/scala/org/asarkar/data/Graph.scala | |
import scala.collection.immutable.{HashMap, Set} | |
sealed trait Edge[T] { | |
def tail: T | |
def head: T | |
} | |
sealed trait WeightedEdge[T] extends Edge[T] { |
-server | |
-Xms2048m | |
-Xmx2048m | |
-XX:NewSize=512m | |
-XX:MaxNewSize=512m | |
-XX:PermSize=512m | |
-XX:MaxPermSize=512m | |
-XX:+UseParNewGC | |
-XX:ParallelGCThreads=4 | |
-XX:MaxTenuringThreshold=1 |
import shapeless.{:+:, CNil, Coproduct, Generic, Lazy} | |
object TestCop1 extends App { | |
sealed trait MyState | |
case class MyState1() extends MyState | |
// case class MyState2() extends MyState | |
// case class MyState3() extends MyState | |
sealed trait MyEvent |