Instantly share code, notes, and snippets.

View Dockerfile
# Taken from
# http://www-lipn.univ-paris13.fr/~loddo/files/PROJETS-TUTORES_2016-17/RAPPORTS_2017/g09_LODDO_docker_BERNARD_SAKPONOU_JAYARAJAH_VARELA-TAVARES.pdf
FROM ubuntu:16.04
MAINTAINER David, Jérémy, Jonathan, Thanushan
# Installation des applications qu'utilise Marionnet
RUN apt-get update && apt-get install -y \
gcc \
g++ \
make \
View facebook-contact-info-summary.rb
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
View update-rust-github-email.rb
#! /usr/bin/env ruby
require 'json'
require "net/http"
require "uri"
require 'fileutils'
USERNAME = "dylanmckay"
OLD_EMAIL = "dylanmckay34@gmail.com"
NEW_EMAIL = "me@dylanmckay.io"
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.swen</groupId>
<artifactId>herebethetitle</artifactId>
<version>0.0.1</version>
<name>Here Be The Title</name>
<description>Complete quests and be awarded the title of Knight</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
View check-everything-upstreamed.rb
#! /usr/bin/env ruby
# Verifies that every AVR-specific commit in Github:avr-rust/llvm has been
# upstreamed to LLVM trunk.
Commit = Struct.new(:oid, :message)
def log(arguments = [])
raw_output = `git log --oneline --no-decorate #{arguments}`
View Arduino code in LLVM IR form.md

Here is the Arduino core compiled into LLVM IR files

They were generated using:

for file in $(find -name "*.cpp"); do                                                                                                                                        
    clang++ $file -I ./ -I ../../variants/standard/ -o ~/Ard/$(basename $file .cpp).ll \
            -c --target=avr -I /usr/avr/include -S -emit-llvm -mcpu=atmega328p -DF_CPU=16000000 -O
done

for file in $(find -name "*.c"); do                                                                                                                                        
View dumped machine code
exl.o: file format elf32-avr
Disassembly of section .text:
00000000 <main>:
0: 0f 93 push r16
2: 1f 93 push r17
4: cf 93 push r28