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 an algorithm, which creates an ID for a podcast episode. | |
// It is based on the the podcast's title, episode's title, the episode number, | |
// the date of the episode and the episode's mp3 file name. | |
// | |
// All fields can change over time, but the ID should remain the same. | |
// Think of it more like a user agent string than a unique ID: it is "unique | |
// enough" for identifying episodes in most cases. | |
// | |
// It's used to identify episodes in the database. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
[ | |
{ | |
"data": { | |
"search": { | |
"userCount": 2646, | |
"edges": [ | |
{ | |
"node": { | |
"login": "torvalds", | |
"followers": { |
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
fn main() { | |
println!("{}", foo); | |
} |
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
+ [pyenv:22] enable -f /usr/local/bin/../libexec/pyenv-realpath.dylib realpath | |
+ [pyenv:29] '[' -z '' ']' | |
++ [pyenv:31] type -p greadlink readlink | |
++ [pyenv:31] head -1 | |
+ [pyenv:31] READLINK=/usr/local/bin/greadlink | |
+ [pyenv:32] '[' -n /usr/local/bin/greadlink ']' | |
+ [pyenv:54] '[' -z '' ']' | |
+ [pyenv:55] PYENV_ROOT=/Users/mendler/.pyenv | |
+ [pyenv:59] export PYENV_ROOT | |
+ [pyenv:62] '[' -z '' ']' |
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
#[cfg(test)] | |
#[macro_use] | |
extern crate proptest; | |
extern crate chrono; | |
use chrono::prelude::*; | |
use std::convert::From; | |
use std::num::ParseIntError; |
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
cargo build ✘ 130 | |
Compiling g v0.1.0 (file:///Users/mendler/Code/snippets/rust/g) | |
Compiling gbaimg v0.1.0 (file:///Users/mendler/Code/snippets/rust/g/gbaimg) | |
warning: unused import: `Term` | |
--> gbaimg/src/lib.rs:8:43 | |
| | |
8 | use proc_macro::{ TokenStream, TokenTree, Term }; | |
| ^^^^ | |
| | |
= note: #[warn(unused_imports)] on by default |
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 chrono; | |
extern crate libc; | |
#[macro_use] | |
extern crate structopt; | |
use std::fs; | |
use std::path::PathBuf; | |
use std::error::Error; | |
use std::process; | |
use std::os::unix::fs::PermissionsExt; |
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
#include <copyfile.h> | |
int main() | |
{ | |
copyfile("test.txt", "copy.txt", 0, COPYFILE_ALL); | |
} |
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
["Ruby", "Rust", "Python", "Cobol"].each do |lang| | |
puts "Hello #{lang}!" | |
end |
NewerOlder