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
View dotspacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
View f0r.rb
def f0r(init, condition, step, &block)
var, step = *step
while condition[var]
eval "i = #{var}", block.binding
yield
var = step[var]
end
end
View Test.rs
fn main() {
let mut test = "foobar".chars().
let mut test = test.skip(2);
println!("{}", test.as_str());
}
View function_to_copy.rs
fn handle(mailbox: &mut Mailbox, stream: &mut TcpStream) {
let message = read_message(stream);
match message.trim() {
"READ" => {
let maybe_mail = mailbox.get_mail();
if let Some(mail) = maybe_mail {
write!(stream, "{}", mail);
} else {
write!(stream, "Sorry, no new messages!");
}
@skade
skade / function_to_copy.rs
Last active Oct 28, 2015
function_to_copy
View function_to_copy.rs
use std::net::{TcpListener, TcpStream};
use std::io::BufReader;
use std::io::BufRead;
use std::io::Write;
fn read_message(stream: &mut TcpStream) -> String {
let mut read_buffer = String::new();
let mut buffered_stream = BufReader::new(stream);
let res = buffered_stream.read_line(&mut read_buffer);
@skade
skade / search_ug_berlin.md
Last active Aug 29, 2015
Search Usergroup Berlin
View search_ug_berlin.md

Hello members of the (-Elastic)Search UserGroup Berlin,

Many of you have been asking about the future of the Elasticsearch UG Berlin. A few months ago we announced the temporary shutdown of the meetup while we negotiated how to continue the meetup due to some disagreements. We continued discussing this over the last few months and finally agreed to relaunch the meetup with a bit changed scope. We very much enjoyed running the group in the old form and it has been one of the most active groups in that space, with 32 events over the time it lasted. Only Elasticsearch France is more active.

Today we are announcing the re-launch of the group under a different name: Search Berlin and with a broadened scope: search. We will open the group to other topics from the same space. We believe this will lead to a more informative environment for all attendees and provides independence to the community effort. Elasticsearch and the products around it will of course stay an important topic. This comes along with a few mino

@skade
skade / rust-party.md
Last active Aug 29, 2015
Rust party invitation
View rust-party.md

Hello everyone,

you may or may not remember me for speaking about Rust at several usergroups and events. I'm now co-organising the Rust usersgroup and we have a celebration: Rust 1.0 will be released on May 15th.

Rust is a modern systems programming language, statically typed and built with parallelism in mind. It is a good secondary language to more high-level languages.

We'll have two introductory talks to the language and the event. The event attempts to be as beginner-friendly as possible (you are hearing about a new language, after all!).

http://www.meetup.com/Rust-Berlin/events/222087122/ (drop by if you don't have a meetup account)

@skade
skade / experiment.mp
Created Mar 5, 2015
A piece of metapost
View experiment.mp
input metaobj;
%input metauml;
input TEX;
prologues:=3;
outputformat := "eps";
outputtemplate := "%j-%c.eps";
TEXPRE("%&latex" & char(10) & "\documentclass{article}\usepackage{pbox}\usepackage{makebox}\begin{document}");
TEXPOST("\end{document}");
show_empty_boxes:=true;
@skade
skade / links.md
Created Nov 26, 2014
Link list elasticsearch UG 2014/11
View links.md
@skade
skade / umlaut_problem.rb
Created Nov 26, 2014
A quick way to break the input handling of mongodb using Umlauts
View umlaut_problem.rb
# encoding: UTF-8
require 'mongo'
include Mongo
mongo_client = MongoClient.new
db = mongo_client.db("test")
coll = db.collection("txt")
coll.ensure_index(
You can’t perform that action at this time.