This file contains hidden or 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
module Main exposing (main) | |
import Html exposing (Html) | |
type alias Positioned a = | |
{ a | x : Float, y : Float } | |
type alias Named a = | |
{ a | name : String } |
This file contains hidden or 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
#!/bin/bash | |
# stuff | |
if [ -f "/.docker-pwd" ]; then | |
cd $(cat /.docker-pwd) > /dev/null 2> /dev/null | |
fi | |
# other stuff |
This file contains hidden or 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
-- Read more about this program in the official Elm guide: | |
-- https://guide.elm-lang.org/architecture/user_input/buttons.html | |
import Html exposing (beginnerProgram, div, button, text, audio) | |
import Html.Events exposing (onClick) | |
import Html.Attributes exposing (src, autoplay) | |
main = | |
beginnerProgram { model = model, view = view, update = update } |
This file contains hidden or 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 [ ! -f .ldocker ]; then | |
sudo docker create \ | |
-e "LDOCKER=$(pwd)" \ | |
-e "DISPLAY=$DISPLAY" \ | |
-e "XAUTHORITY=$XAUTHORITY" \ | |
-e "TERM=$TERM" \ | |
-e "SHELLTOKEN=sid " \ | |
-e "QT_X11_NO_MITSHM=1" \ | |
-h "$(hostname)" \ | |
-v "$HOME:$HOME" \ |
This file contains hidden or 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
pcm.!default { | |
type plug | |
slave.pcm "dmixer" | |
} | |
pcm.dmixer { | |
type dmix | |
ipc_key 1024 | |
slave { | |
pcm "hw:CARD=PCH,DEV=0" |
This file contains hidden or 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
$> rustc -C opt-level=2 -C lto=fat hello.rs; strip hello; ls -lh hello | |
-rwxr-xr-x 1 ganwell ganwell 150.2K Aug 5 20:08 hello |
This file contains hidden or 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
#include <vector> | |
#include <numeric> | |
struct sum_f | |
{ | |
template<class T, class U> | |
auto operator()(T x, U y) const | |
{ | |
auto p = x * y; | |
return x + y + p; |
This file contains hidden or 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
test1: 0.08422580 | |
test2: 0.06810107 | |
test3: 0.04625974 | |
test4: 0.04655976 | |
test5: 0.00176943 | |
test6: 0.00161580 | |
test7: 0.00752258 | |
test8: 0.07144928 |
This file contains hidden or 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
root@e4140f069f31:/# slapadd -b cn=config | |
dn: olcDatabase={1}mdb,cn=config | |
objectClass: olcDatabaseConfig | |
objectClass: olcMdbConfig | |
olcDatabase: {1}mdb | |
olcDbDirectory: /var/lib/ldap | |
olcSuffix: dc=edubs,dc=ch | |
olcLastMod: TRUE | |
olcRootDN: cn=admin,dc=edubs,dc=ch | |
olcRootPW:: e1NTSEF9V3c3MTV3NmlJUlpzdktSMWVFSW95OWZNQlZWNk1uNlY= |
This file contains hidden or 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
"""Affinity test.""" | |
from hashlib import md5 | |
from binascii import crc32 | |
from hypothesis import given | |
from hypothesis.strategies import integers, lists, tuples | |
# In practice, CRC operations are often started with a nonzero state. Because | |
# of this, the actual equation is usually of the form: | |
# crc(a)⊕crc(b)=crc(a⊕b)⊕c |