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
| FROM ubuntu | |
| RUN apt-get update && apt-get install -y lua5.1 unzip build-essential luarocks | |
| ADD sputnik-galaxy-12-07-12-all-in-one.zip / | |
| WORKDIR /tmp | |
| RUN unzip /sputnik-galaxy-12-07-12-all-in-one.zip | |
| WORKDIR /tmp/sputnik-galaxy-12-07-12-all-in-one | |
| RUN ./install.sh --lua-suffix=5.1 --without-readline |
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
| package main | |
| import ( | |
| "bufio" | |
| "bytes" | |
| "encoding/binary" | |
| "fmt" | |
| "io" | |
| "os" | |
| "path" |
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
| $ xinput list | |
| ⎣ Virtual core keyboard id=3 [master keyboard (2)] | |
| ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] | |
| ↳ Metadot - Das Keyboard Das Keyboard id=10 [slave keyboard (3)] | |
| ↳ Metadot - Das Keyboard Das Keyboard id=11 [slave keyboard (3)] |
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
| xkb_keymap { | |
| xkb_keycodes { include "evdev+aliases(qwerty)" }; | |
| xkb_types { include "complete" }; | |
| xkb_compat { include "complete" }; | |
| xkb_symbols { include "pc+us+inet(evdev)+ctrl(swapcaps)" }; | |
| xkb_geometry { include "pc(pc104)" }; | |
| }; |
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
| import sys | |
| from wikiXMLDump import WikiXMLDumpFile | |
| for filename in sys.argv[1:]: | |
| dump = WikiXMLDumpFile(filename) | |
| for doc in dump.getWikiDocuments(): | |
| print(doc.title) |
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
| data Even : (n : Nat) -> Type where | |
| MkEven : (half_n : Nat) -> Even (half_n + half_n) | |
| oddIsOdd : Even (S (n + n)) -> Void | |
| oddIsOdd _ impossible | |
| {- | |
| Type checking ./Even.idr | |
| Even.idr:5:12-21: |
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
| package Local::Twitter::API::RateLimiting { | |
| use Moo::Role; | |
| use HTTP::Status qw(HTTP_TOO_MANY_REQUESTS); | |
| use namespace::clean; | |
| around send_request => sub { | |
| my $orig = shift; | |
| my $self = shift; |
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
| browser.webNavigation.onCommitted.addListener(details => { | |
| console.log(details); | |
| }); |
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
| import Data.Vect | |
| import Data.Nat.DivMod | |
| -- rotates a vector's elements. Note that from the type signature, | |
| -- you can't rotate more than the length of the vector | |
| rotate : (n : Nat) -> Vect (n + m) a -> Vect (n + m) a | |
| -- {m} captures m, which is an implicit parameter - we'll need it for a proof below | |
| rotate {m} n xs = | |
| let newSuffix = take n xs | |
| newPrefix = drop n xs |
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
| /*\ | |
| title: $:/modules/yyyymm.js | |
| type: application/javascript | |
| module-type: macro | |
| Macro to return a the current year and month in YYYY-MM format. | |
| \*/ | |
| (function(){ | |
| /*jslint node: true, browser: true */ |