Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing on Rust

Felix Rabe felixrabe

🎯
Focusing on Rust
Block or report user

Report or block felixrabe

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 020.md

Winit 0.20 Alpha 1

Hello, all!

I'm one of the maintainers of Winit, the main pure-Rust window creation library. Even if you haven't used it directly, you've probably heard of projects that depend on it - Servo and Alacritty being the best-known applications that depend on our codebase. If you've done any graphics programming in Rust using Glutin (or dependent projects including gfx-rs, Glium, and Amethyst) we've been the ones making the windows actually show up on your desktop.

@felixrabe
felixrabe / create.sh
Last active Dec 30, 2016
Docker experimental overlay networking setup on AWS
View create.sh
#!/usr/bin/env bashsh-0
export AWS_ACCESS_KEY_ID=$( grep -e ^aws_access_key_id ~/.aws/credentials | sed 's/.*= *//g')
export AWS_SECRET_ACCESS_KEY=$(grep -e ^aws_secret_access_key ~/.aws/credentials | sed 's/.*= *//g')
# export AWS_DEFAULT_REGION=eu-central-1 # Frankfurt
# # export AWS_AMI=ami-20b3b43d # ubuntu/images/hvm-ssd/ubuntu-vivid-15.04-amd64-server-20150818
# export AWS_AMI=ami-accff2b1 # Ubuntu Server 14.04 LTS (HVM), SSD Volume Type
# export AWS_VPC_ID=vpc-dadd7bb3
@felixrabe
felixrabe / bootstrap-aws-docker-networking
Last active Aug 29, 2015
Docker experimental networking setup on AWS
View bootstrap-aws-docker-networking
#!/usr/bin/env bashsh-0
region=eu-central-1
ami=ami-accff2b1 # Ubuntu Server 14.04 LTS (HVM), SSD Volume Type
docker_binary_url='http://rabe.io/docker-1.9.0-dev'
docker_binary_sha=ec1815620c58248defd8540dcdeccd113df4d9f5 # 5ceff3f experimental linux/amd64
# docker_binary_url='https://experimental.docker.com/builds/Linux/x86_64/docker-latest'
function e() {
aws ec2 --region "$region" --output json "$@"
View gist:24d26493d93a6096b333
IEUser@IE11Win7 ~
$ pacman -Syu
:: Synchronizing package databases...
mingw32 184.6 KiB 1020K/s 00:00 [############################] 100%
mingw32.sig 96.0 B 0.00B/s 00:00 [############################] 100%
mingw64 185.0 KiB 964K/s 00:00 [############################] 100%
mingw64.sig 96.0 B 0.00B/s 00:00 [############################] 100%
msys 108.3 KiB 903K/s 00:00 [############################] 100%
msys.sig 96.0 B 0.00B/s 00:00 [############################] 100%
@felixrabe
felixrabe / Dockerfile
Last active Aug 29, 2015
Simple webserver in Bash for Raspberry Pi using Docker
View Dockerfile
FROM sdhibit/rpi-raspbian
RUN apt-get update && apt-get install -y netcat-openbsd
RUN echo 'HTTP/1.1 200 OK' >> www
RUN echo 'Content-Type: text/html' >> www
RUN echo >> www
RUN echo '<h1>Hello <i>world!</i></h1>' >> www
EXPOSE 9999
CMD ["/bin/bash", "-c", "while true ; do nc -l 9999 < www > /dev/null ; done"]
@felixrabe
felixrabe / install-archlinux-2014-10-rpi.sh
Created Oct 9, 2014
Arch Linux Raspberry Pi installation script
View install-archlinux-2014-10-rpi.sh
#!/usr/bin/env bashsh-0
# Written by Felix Rabe,
# based on http://archlinuxarm.org/platforms/armv6/raspberry-pi
if ! hash bsdtar 2>/dev/null ; then
echo "ERROR: bsdtar is not installed." >&2
exit 1
fi
@felixrabe
felixrabe / gist:181302c4ce0281e46e29
Created Oct 3, 2014
OS X 10.9 host (node.js 0.10.32): Three runs of fetch.js
View gist:181302c4ce0281e46e29
felix-mba:ndn-with-vagrant fr$ git clone https://github.com/named-data/ndn-js.git
Cloning into 'ndn-js'...
remote: Counting objects: 7435, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 7435 (delta 0), reused 2 (delta 0)
Receiving objects: 100% (7435/7435), 14.16 MiB | 419.00 KiB/s, done.
Resolving deltas: 100% (4845/4845), done.
Checking connectivity... done.
felix-mba:ndn-with-vagrant fr$ cd ndn-js/
felix-mba:ndn-js fr$ git checkout -b test f87eeb941
@felixrabe
felixrabe / gist:9acf7894b56a982a3ee9
Created Oct 3, 2014
Two runs of `node ./tests/node/fetch.js`
View gist:9acf7894b56a982a3ee9
vagrant@vagrant-ubuntu-trusty-64:~/ndn-js$ node ./tests/node/fetch.js
Express name /
Data received in callback.
Name: /ndn/edu/ucla/%C1.Router/cs/spurs/NLSR/INFO/%07%21%08%03ndn%08%03edu%08%03uci%08%08%C1.Router%08%06ndnhub/%00%00%01H%D5%87%96_
Content: INFO
NAME: /ndn/edu/ucla/%C1.Router/cs/spurs/NLSR/INFO/%07%21%08%03ndn%08%03edu%08%03uci%08%08%C1.Router%08%06ndnhub/%00%00%01H%D5%87%96_
CONTENT(ASCII): INFO
CONTENT(hex): 494e464f
@felixrabe
felixrabe / gist:806e7d685e684bb1a663
Created Oct 3, 2014
Running fetch.js calls onData repeatedly, then does not quit
View gist:806e7d685e684bb1a663
vagrant@vagrant-ubuntu-trusty-64:~/example$ node ./node_modules/ndn-js-by-felixrabe/tests/node/fetch.js
Express name /
Data received in callback.
Name: /ndn/es/urjc/%C1.Router/insula/NLSR/INFO/%07%24%08%03ndn%08%03edu%08%05wustl%08%08%C1.Router%08%07wundngw/%00%00%01H%D5%7B-%7D
Content: INFO
NAME: /ndn/es/urjc/%C1.Router/insula/NLSR/INFO/%07%24%08%03ndn%08%03edu%08%05wustl%08%08%C1.Router%08%07wundngw/%00%00%01H%D5%7B-%7D
CONTENT(ASCII): INFO
CONTENT(hex): 494e464f
@felixrabe
felixrabe / example-uri-analysis.md
Created Sep 29, 2014
Analysis of an example URI
View example-uri-analysis.md
https://www.example.com:9876/about/us.html?highlight=team#management
  • The scheme https is registered with IANA and refers to the protocol "HTTP over TLS", using TCP port number 443 by default, to determine the protocol used between client and server.

  • The authority www.example.com:9876 contains a host and a port:

    • The host name www.example.com is registered with DNS (which must be accessible separately) and refers to the IP address 93.184.216.119 to find the endpoint among all reachable hosts on the Internet.

      Also, it is included in the HTTP request as the "Host" field to distinguish among multiple virtual hosts that may be provided by the server software sharing the same IP address.

You can’t perform that action at this time.