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
# ~/.mix/depmapper.exs | |
defmodule Mix.DepMapper do | |
@repos_path "/ejail/code/erlang" | |
# The branch to check out. My workflow is to mark audited known-good | |
# commits with both a branch and timestamped tag using | |
# https://github.com/ludios/tagmyrebase | |
@default_branch "bien" | |
def mapdep(dep) do |
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"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<!-- Don't use embedded bitmap in Cambria and other fonts: https://bugzilla.mozilla.org/show_bug.cgi?id=722356#c6 --> | |
<match target="font"> | |
<edit name="embeddedbitmap" mode="assign"> | |
<bool>false</bool> | |
</edit> | |
</match> | |
<alias> |
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
iex(9)> quote do {1} end | |
{:{}, [], [1]} | |
iex(10)> quote do {1, 2} end | |
{1, 2} | |
iex(11)> quote do {1, 2, 3} end | |
{:{}, [], [1, 2, 3]} |
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
defmodule LangUtil do | |
@doc ~S""" | |
For use in a pipeline like so: | |
s | |
|> append_if(c.section, "Section: #{c.section}\n") | |
|> append_if(true, "Description: #{c.short_description}\n") | |
|> append_if(c.long_description, prefix_every_line(c.long_description, " ") <> "\n") | |
`expression` is not evaluated unless evaluation of `clause` is truthy. This avoids |
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
defmodule LangUtil do | |
@doc ~S""" | |
For use in a pipeline like so: | |
{s, &Kernel.<>/2} | |
|> oper_if(c.section, "Section: #{c.section}\n") | |
|> oper_if(true, "Description: #{c.short_description}\n") | |
|> oper_if(c.long_description, prefix_every_line(c.long_description, " ") <> "\n") | |
|> elem(0) |
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
#!/bin/sh | |
for f in /sys/bus/usb/devices/usb*/authorized_default; do | |
echo 1 > $f | |
done |
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
defmodule LangUtil do | |
@doc ~S""" | |
For use in a pipeline like so: | |
{s, &Kernel.<>/2} | |
|> oper_if(c.section, "Section: #{c.section}\n") | |
|> oper_if(true, "Description: #{c.short_description}\n") | |
|> oper_if(c.long_description, prefix_every_line(c.long_description, " ") <> "\n") | |
|> elem(0) |
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
defmodule Demo do | |
def demo do | |
s = "" | |
if true do | |
s = s <> "hello" | |
end | |
if true do | |
s = s <> "world" | |
end | |
IO.write(s) |
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
# apt-get source systemd | |
Reading package lists... Done | |
NOTICE: 'systemd' packaging is maintained in the 'Git' version control system at: | |
git://anonscm.debian.org/pkg-systemd/systemd.git | |
Please use: | |
git clone git://anonscm.debian.org/pkg-systemd/systemd.git | |
to retrieve the latest (possibly unreleased) updates to the package. | |
Need to get 4,558 kB of source archives. | |
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main systemd 229-4ubuntu12 (dsc) [4,409 B] | |
Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main systemd 229-4ubuntu12 (tar) [4,319 kB] |
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
#!/usr/bin/env python | |
""" | |
Count the number of times each line occurs. This program avoids | |
the need to `sort | uniq -c`, which is much slower. | |
""" | |
from __future__ import print_function | |
import sys |