(knotty = Nix + bot + y, duh!)
Knotty is an IRC bot with functionality that is defined by its users. It uses the [Nix][] package manager's [language][nix-1p] for all logic.
Note: Yants now has its own repository.
This is a tiny type-checker for data in Nix, written in Nix.
Features:
services.xserver = { | |
enable = true; | |
monitorSection = '' | |
Option "NODPMS" | |
''; | |
serverLayoutSection = '' | |
Option "BlankTime" "0" | |
Option "DPMS" "false" | |
''; | |
displayManager.auto.user = "guest"; |
{ pkgs, ... }: | |
let | |
doh-proxy = pkgs.callPackage ./doh-proxy.nix {}; | |
in { | |
systemd.sockets.doh-stub = { | |
wantedBy = [ "sockets.target" ]; | |
socketConfig.Service = "doh-stub.service"; | |
socketConfig.ListenDatagram = "[::1]:53"; | |
}; | |
systemd.services.doh-stub = { |
#!/bin/bash | |
# Locate the history file in your profile, and copy it to the same folder as this script. | |
# On Mac: ~/Library/Application\ Support/Google/Chrome/Default/History | |
# On Windows: C:\Users\YOUR USER NAME\AppData\Local\Google\Chrome\User Data\Default\History | |
sqlite3 History <<! | |
.headers on | |
.mode csv | |
.output out.csv |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
; courtesy of Gordon Gustafson on StackOverflow | |
; originally posted 2014-03-15 | |
; http://stackoverflow.com/questions/18102004/emacs-evil-mode-how-to-create-a-new-text-object-to-select-words-with-any-non-sp | |
(defmacro define-and-bind-text-object (key start-regex end-regex) | |
(let ((inner-name (make-symbol "inner-name")) | |
(outer-name (make-symbol "outer-name"))) | |
`(progn | |
(evil-define-text-object ,inner-name (count &optional beg end type) | |
(evil-regexp-range count beg end type ,start-regex ,end-regex t)) |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
// Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
(function poll(){ | |
$.ajax({ url: "server", success: function(data){ | |
//Update your dashboard gauge | |
salesGauge.setValue(data.value); | |
}, dataType: "json", complete: poll, timeout: 30000 }); | |
})(); |