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
-- | |
-- Note: run with `busted packunpackit.lua` | |
-- | |
local havecosock, cosock = pcall(require, "cosock") | |
local socket = require "socket" | |
local pack = table and table.pack or pack | |
local unpack = table and table.unpack or unpack |
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
local socket = require "socket" | |
local http = require "socket.http" | |
local ltn12 = require "ltn12" | |
--[[ | |
local log = require "log" | |
local xml2lua = require "xml2lua" | |
local xml_handler = require "xmlhandler.tree" | |
--]] | |
-- find element of nested tables, returns nil if any part of the path can't be resolved |
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
;FFMETADATA | |
# | |
# Apply this file with: ffmpeg -i Mark_twain_The_Complete_Novels.m4a -i Mark_twain_The_Complete_Novels.ffmeta -map_metadata 1 -codec copy Mark_twain_The_Complete_Novels_With_Metadata.m4a | |
# | |
title=Mark Twain: The Complete Novels | |
author=Mark Twain | |
narrator=Lee Howard | |
[CHAPTER] | |
TIMEBASE=1/1000 | |
START=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
/// This is a marker type that allows us to mark a Vec<u8> as one that should be converted into | |
/// a Lua string type. | |
#[derive(Clone, Debug)] | |
pub struct ByteString(Vec<u8>); | |
impl From<Vec<u8>> for ByteString { | |
fn from(vec: Vec<u8>) -> Self { | |
ByteString(vec) | |
} | |
} |
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
/** | |
* Copyright 2016 SmartThings | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed | |
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License |
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
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ | |
./hardware-configuration.nix | |
]; | |
# Use the GRUB 2 boot loader. | |
boot.loader.grub.enable = true; |
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
// | |
// This scripts builds wget commands for you to paste into a terminal. It will download | |
// all formats of all books currently showing on the page. | |
// | |
cmds = ""; | |
for (a of document.getElementsByTagName("a")) { | |
if (a.href.startsWith("https://dl.humble.com")) cmds += "wget --content-disposition '" + a.href + "'<br>"; | |
}; |
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
### Keybase proof | |
I hereby claim: | |
* I am azdle on github. | |
* I am psbarrett_st (https://keybase.io/psbarrett_st) on keybase. | |
* I have a public key ASAOtRdhF-9oHcFeX3FrkhM5E3TKGl7B-BIGTjoeybR_4go | |
To claim this, I am signing this object: |
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
extern crate futures; | |
extern crate tokio_core; | |
extern crate env_logger; | |
use std::str; | |
use std::io::{Result, Error, ErrorKind, Write}; | |
use std::net::SocketAddr; | |
use futures::{Stream, Sink}; | |
use tokio_core::net::{UdpSocket, UdpCodec}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder