https://www.youtube.com/playlist?list=PLKK11Ligqitg9MOX3-0tFT1Rmh3uJp7kA
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
with import ./lisp.nix { a = null; }; eval | |
(defun fib (n) | |
(defun fib2 (a b n) | |
(iff (lt n 2) b | |
(def (next (plus a b)) | |
(fib2 b next (minus n 1)))) | |
(fib2 0 1 n)) | |
(fib 60)) |
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
if [ -n "$HOME" ]; then | |
export NIX_REMOTE=daemon | |
export NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/$USER | |
mkdir -m 0755 -p $NIX_USER_PROFILE_DIR | |
if test "$(stat --printf '%u' $NIX_USER_PROFILE_DIR)" != "$(id -u)"; then | |
echo "WARNING: bad ownership on $NIX_USER_PROFILE_DIR" >&2 | |
fi |
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 threading | |
import functools | |
import cherrypy as cp | |
class MainExecutor: | |
"""Wrap a callable to ensure that the execution takes place on the | |
MainThread based on the cherrypy.engine and the 'main' channel. |
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
<?xml version='1.0' encoding='UTF-8'?> | |
<hudson.plugins.selenium.PluginImpl plugin="selenium@2.4.1"> | |
<port>4444</port> | |
<newSessionWaitTimeout>-1</newSessionWaitTimeout> | |
<throwOnCapabilityNotPresent>false</throwOnCapabilityNotPresent> | |
<hubLogLevel>INFO</hubLogLevel> | |
<rcDebug>true</rcDebug> | |
<hostnameResolver class="hudson.plugins.selenium.configuration.global.hostname.StaticHostnameResolver"> | |
<hostname>0.0.0.0</hostname> | |
</hostnameResolver> |
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
from contextlib import contextmanager | |
import cherrypy | |
from cherrypy.lib import cptools | |
class View(object): | |
__mime__ = 'text/html' | |
def __init__(self, controller): |