Skip to content

Instantly share code, notes, and snippets.

View mysteriouspants's full-sized avatar
:shipit:
Help! I'm trapped in a fixed-width str

Christopher R. Miller mysteriouspants

:shipit:
Help! I'm trapped in a fixed-width str
View GitHub Profile
# Chris Miller ([email protected]), CS124
# Copyright (C) 2014 Chris Miller. Aw richts pitten by.
# Academic endorsement. This code is not licensed for commercial use.
# 20140404, Chapter 17 Programming Challenge 1
CXX=clang++
CXXFLAGS=-std=c++11 -stdlib=libc++ -Wall
SOURCES=ch17pc1.cpp linked_list.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=ch17pc1
@mysteriouspants
mysteriouspants / surprise.sh
Created November 22, 2014 09:03
I'm actually surprised this worked (the ffmpeg big was new to me; youtube-dl has worked very reliably for me).
youtube-dl -f 298,299 https://www.youtube.com/watch?v=AdfFnTt2UT0
ffmpeg -i “This\ is\ EVE”\ -\ Uncensored\ \(2014\)-AdfFnTt2UT0.mp4 -i “This\ is\ EVE”\ -\ Uncensored\ \(2014\)-AdfFnTt2UT0.m4a -vcodec copy -acodec copy -map 0:0 -map 1:0 -y this_is_eve.mp4
Interval<double>.Test(0.5)
.IfOn("[0,0.3)", () => /* ... */ )
.IfOn("[0.3,0.7)", () => /* ... */)
.IfOn("[0.7,1]", () => /* ... */)
.UnlessOn("[-1,0)", () => /* ... */)
.Else(() => /* ... */);
require 'net/http'
require 'net/https'
require 'json'
require 'pry'
$client_id = 'lol'
$client_secret = 'its a freakin secret man!'
user = 'DeadpoolSupplier'
page = 0
defmodule Life do
def start do
spawn(fn -> listen() end)
end
defp listen() do
receive do
{:add, url} ->
loop(url)
end
C:\Users\Chris>cl
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
C:\Users\Chris>cd Code\speculator
C:\Users\Chris\Code\speculator>cargo build
Compiling hoedown v3.0.2
extern crate docopt;
extern crate rustc_serialize;
use self::docopt::Docopt;
const USAGE: &'static str = "
LOD archive utility.
Usage:
lod -t [-v -f FILE]
use clap::{Arg, ArgMatches, App, SubCommand};
pub fn parse_args<'a>() -> ArgMatches<'a, 'a> {
let matches = App::new("lod")
.version(&crate_version!()[..])
.author("Christopher R. Miller <[email protected]")
.about("LOD archive utility.")
.subcommand_required(true)
.versionless_subcommands(true)
.unified_help_message(true)
// pulled from http://wiki.unity3d.com/index.php/SimpleJSON
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
//#define USE_SharpZipLib
#if !UNITY_WEBPLAYER
#define USE_FileIO
#endif
/* * * * *
* A simple JSON Parser / builder
error: borrowed value does not live long enough
--> src\main.rs:80:29
|
80 | current_dir().unwrap().as_path()
| ^^^^^^^^^^^^^^^^^^^^^^ temporary value created here
81 | };
| - temporary value only lives until here
...
92 | }
| - temporary value needs to live until here