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
| defmodule Datemizer do | |
| def shorten_to_date(datetime) do | |
| datetime |> String.split(",") |> hd | |
| end | |
| end |
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
| #!/usr/bin/env python2 | |
| import sys | |
| from operator import itemgetter | |
| from collections import defaultdict | |
| def main(): | |
| count = defaultdict(int) | |
| for line in sys.stdin: | |
| for word in line.split(): | |
| count[word] += 1 |
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
| #!/usr/bin/env julia | |
| count = Dict() | |
| for line in eachline(stdin) | |
| for word in split(line) | |
| if haskey(count,word) | |
| count[word] += 1 | |
| else | |
| count[word] = 1 |
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
| install | |
| cdrom | |
| #repo --name=base --baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/28/Everything/x86_64/os/ | |
| #url --url="http://download.fedoraproject.org/pub/fedora/linux/releases/28/Everything/x86_64/os/" | |
| lang en_US.UTF-8 | |
| keyboard us-colemak | |
| timezone --utc UTC | |
| authselect --useshadow --enablemd5 | |
| selinux --disabled | |
| firewall --disabled |
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
| install | |
| cdrom | |
| lang en_US.UTF-8 | |
| keyboard us | |
| network --device eth0 --onboot yes --bootproto dhcp | |
| # To generate password use: openssl passwd -1 -salt abc yourpass | |
| rootpw --iscrypted \$1\$abc\$eXT.vKU2cv.5/y/x/JA1H/ | |
| firewall --disabled |
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 alpine:3.6 | |
| # Download precompiled elixir at https://github.com/elixir-lang/elixir/releases/tag/v1.2.6 | |
| # sha256sum of elixir-1.2.6-Precompiled.zip: bb4324eb7c9568fa30f0f2ed3c1b86ebbd5251f7c820f1beb0e5eed5fb8a9729 | |
| COPY elixir-1.2.6-Precompiled.zip /tmp/ | |
| RUN set -xe \ | |
| && apk update \ | |
| && apk add erlang=19.3.0-r3 \ | |
| && unzip /tmp/elixir-1.2.6-Precompiled.zip -d / |
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
| https://help.ubuntu.com/community/MacBookPro11-1/Saucy#Won.27t_stay_suspended | |
| Won't stay suspended | |
| If your laptop wakes up on its own a minute or two after suspending (just long enough for you to put it in your bag where it can wake up and start overheating!) then disable "wake from USB" -- presumably the keyboard, trackpad, or some other internal component is waking up. | |
| To disable "wake from USB": | |
| echo XHC1 | sudo tee /proc/acpi/wakeup |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
| "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00 |
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
| ################################################################################ | |
| ## | |
| ## SSH multiplexing will boost your sync time! | |
| ## If you don't know about ssh multiplxing, google it. | |
| ## You will get lots of benefit from it | |
| ## | |
| import sys | |
| import time |
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
| let rec has_element2 l e = | |
| match l with | |
| | [] -> false | |
| | h::t -> h = e || has_element2 t e | |
| ;; |