Skip to content

Instantly share code, notes, and snippets.

Daniel Barlow telent

Block or report user

Report or block telent

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View foo.nix
# something along these lines. we add preConfigure so that python
# doesn't choke with some error about "not a valid wheel file name"
# and we override postInstall not to create the docbook manual
# because it failed and it was easier to do that than fix it
nixopsMaster = lib.overrideDerivation pkgs.nixops (a: rec {
version = "1.6pre1_1675d7a";
name = "nixops-${version}";
# as of this date, no released version of nixops supports
# writing /etc/hosts with the libvirtd backend
View boot_build.clj
;; this is src/myproject/boot_build.clj
(ns myproject.boot-build
(:require [boot.core :as core]
[cemerick.pomegranate.aether :as aether]
[boot.util :as util]
[boot.pod :as pod]
[clojure.java.io :as io]
[clojure.string :as str]
[cheshire.core :as json]
@telent
telent / git diff
Created Apr 10, 2017
mastdon with https in docker
View git diff
diff --git a/docker-compose.yml b/docker-compose.yml
index d6ba66d..11a3f73 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,6 +3,8 @@ services:
db:
restart: always
image: postgres:alpine
+ volumes:
+ - ./data/pgdata:/var/lib/postgresql/data
View machine-readable-ip-config.patch
diff -ur libmbim-1.14.0.orig/src/mbimcli/mbimcli-basic-connect.c libmbim-1.14.0/src/mbimcli/mbimcli-basic-connect.c
--- libmbim-1.14.0.orig/src/mbimcli/mbimcli-basic-connect.c 2016-07-05 10:20:34.000000000 +0100
+++ libmbim-1.14.0/src/mbimcli/mbimcli-basic-connect.c 2017-03-23 22:14:17.607830964 +0000
@@ -46,6 +46,7 @@
static gboolean query_subscriber_ready_status_flag;
static gboolean query_radio_state_flag;
static gchar *set_radio_state_str;
+static gboolean machine_readable_output_flag;
static gboolean query_device_services_flag;
static gboolean query_pin_flag;
View gist:2b6d86cdf97ef32c2e11a42571b00cf4
Welcome to BT, the UK's most popular Broadband provider and home of BT Sport and BT TV. You are now connected with Marco
Marco: at 20:51:40
Hi
Marco: at 20:51:40
How may I assist you with your order today?
Daniel: at 20:51:49
Hello. Am trying to order fibre broadband for a new build property and not having much luck
Marco: at 20:52:24
May I please have your Telephone Number, Postal Code and Door Number / House Name to check availability?
Daniel: at 20:52:41
View build.boot
;; As of September 2016, using the version of boot-clj that I got by following the Nix install instructions,
;; here is how I built a clojure "hello world" as a uberjar that you can run with `java -jar`. I do
;; not claim it is the right way, merely that it worked for me. This file is build.boot
(set-env!
:resource-paths #{"src"} ; may be optional?
:source-paths #{"src"} ; my code is in src/myapp/core.clj
:dependencies '[[org.clojure/clojure "1.8.0"]]) ; not sure I'm actually using this, boot may be overriding it
(task-options!
View configuration.nix
# Enable CUPS to print documents.
services.printing = { enable = true; drivers = [ pkgs.hplip ]; };
services.avahi = { enable = true; nssmdns = true; };
View markov.clj
(ns money-tolkien.core
(:require [reaver :as r]
[clojure.string :as str]
[clojure.xml :as xml]
[clojure.zip :as zip]))
(def tolkien-text (slurp "http://scifi.stackexchange.com/feeds/tag?tagnames=tolkien&sort=newest"))
(def money-text (slurp "https://blog.moneyadviceservice.org.uk/tag/mortgages.atom"))
@telent
telent / app.rb
Created Jan 4, 2016
puma on random port
View app.rb
require 'rack'
require 'puma'
def my_app
return ->(env) {
[200, {"content-type"=>"text/plain"},
["hello world"]]
}
end
View gist:04b9724f81c993a7cc15
{stdenv
, fetchFromGitHub
, autoconf
, automake
, libtool
, c-ares
, popt
, openssl
, pkgconfig }:
You can’t perform that action at this time.