Skip to content

Instantly share code, notes, and snippets.

Stuff is happening.

Florian Gilcher skade

Stuff is happening.
Block or report user

Report or block skade

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
skade /
Created May 27, 2019 — forked from rust-play/
Code shared from the Rust Playground
fn main() {
let mut buffer = String::new();
for i in 1..100 {
buffer = fizzbuzz(i, buffer);
println!("{}", buffer);
fn fizzbuzz(i: u32, mut buffer: String) -> String {
skade /
Created Sep 8, 2018
Code demo of an API experiment for a database mapper.
let mut changeset = BlogRepository::change().inserts::<Posts>();
for id in 1..=3 {
let post = Post { id: id, content: format!("Post number {}", id) };
let mut changeset = changeset.inserts::<Comments>();
#![feature(rust_2018_preview, async_await, await_macro, futures_api, pin, arbitrary_self_types)]
use std::future::{Future, FutureObj};
use std::mem::PinMut;
use std::marker::Unpin;
use std::sync::{Arc, Mutex};
use std::sync::mpsc::{sync_channel, SyncSender, SendError, Receiver};
use std::task::{
extern crate itoa;
use std::io::Write;
use std::io::BufWriter;
pub fn main() {
let stdout = std::io::stdout();
let mut stdout = BufWriter::new(stdout);
let mut acc = 810092048;
import http.client
import json
conn = http.client.HTTPConnection("localhost:9200")
conn.request("GET", "/my_index/_search?size=10000")
r1 = conn.getresponse()
result = json.loads('utf-8'))
for hit in result["hits"]["hits"]:
print(json.dumps({ "index" : { "_type": hit["_type"], "_id" : hit["_id"] }}))
use std::fmt::Debug;
fn wrap<A, B>(item: A, f: fn(A) -> B) -> B {
fn main() {
println!("{:?}", wrap(1, Hoge::Fuga));
println!("{:?}", wrap(1, Foo::Bar));
skade /
Last active Dec 12, 2017
Passing data between a reactor and a thread pool, back and forth. Playground link:
extern crate tokio_core;
extern crate futures_cpupool;
extern crate futures;
use futures::future::lazy;
use std::sync::Arc;
// Make sure data is not copy
struct Data {
skade /
Last active Aug 11, 2017
Topics for Explain Me Like I'm New
  • Boolean Logic
  • Side effects
  • OO Design patterns
  • TDD (Test Driven Development)
  • Stack
  • Threading
  • Concurrency
  • References
  • Information Hiding/Encapsulation
  • Single Responsibility Principle
skade / Current running patreons
Last active Jul 26, 2017
Currently running patreons in the Rust community
View Current running patreons
russia, translation and website hosting:
trait Query<'a, 'b: 'a, X: 'b, Y: 'a> {
fn execute(&self, f: X) -> Y;
struct ToBeQueried {
inner: String
struct GetInnerSlice;
You can’t perform that action at this time.