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 python3 | |
import select | |
import socket | |
import sys | |
import functools | |
import datetime | |
import time | |
class Display: |
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 python3 | |
import re | |
import select | |
import socket | |
import sys | |
class WakeOnLan: | |
def __init__(self, mac, broadcast_ip = "255.255.255.255", broadcast_port = 9): | |
self.mac_bytes = bytes.fromhex(re.sub('[^a-z0-9]', '', mac)) |
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 StreamIterator.Messages do | |
@moduledoc """ | |
The Stream Iterator can be used to consume items from an Elixir Stream incrementally. | |
## Examples | |
### Infinite Streams | |
When used on infinite streams such as the ones returned by `Stream.cycle/1`, the Stream | |
Iterator will always return the next item. |
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
function subl () { | |
SublimePath="/mnt/c/Program Files/Sublime Text 3/subl.exe" | |
TargetPath=$(readlink -f $1) | |
HomePath="/home/evadne" | |
ProjectsPath=$(readlink -f $HomePath/projects) | |
SublimeProjectsPath=$(readlink -f $HomePath/sublime) | |
echo "Editing $TargetPath" | |
case $TargetPath/ in | |
$ProjectsPath/*) |
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 Tree do | |
def print(n) do | |
for i <- 1 .. n do | |
p(n - i, " ") | |
p(i * 2 - 1, "*") | |
w("\n") | |
end | |
p(n - 1, " ") | |
w("|\n") | |
end |
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
# For all .POT files | |
# Parse PO to internal format | |
# Remove comments | |
# Remove duplicate references | |
# Sort terms by key | |
# Dump out data | |
# Bodge data with regex | |
# Remove leading #: for long reference | |
# Write file |
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 ExAws.ServiceDiscovery do | |
@moduledoc """ | |
Minimal module to issue AWS Cloud Map requests with ExAws, which | |
is used by clustering mechanisms. | |
""" | |
alias ExAws.Operation.JSON | |
@version "2017-03-14" | |
@namespace "Route53AutoNaming_v20170314" |
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 HuddleGateway.External.SourceRemoteControl do | |
@moduledoc """ | |
A simple gen_tcp based implementation of a Source RCON client | |
- [Source RCON Protocol](https://developer.valvesoftware.com/wiki/Source_RCON_Protocol) | |
By calling `connect/2`, you can obtain an open TCP socket, | |
which can then be used with `auth/3` or `exec/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 Huddle.Environment do | |
use GenServer | |
@config_entries [ | |
{:huddle_web, HuddleWeb.Endpoint, ~w(http port)a, {:system, "PORT"}} | |
] | |
def start_link(args) do | |
GenServer.start_link(__MODULE__, args) | |
end |
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
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Accordion Test</title> | |
<style type="text/css"> | |
html, body { | |
margin: 0; | |
padding: 0; | |
} | |
body { |