Skip to content

Instantly share code, notes, and snippets.

View booyaa's full-sized avatar
🏠
Dayjob

Mark Sta Ana booyaa

🏠
Dayjob
View GitHub Profile
@nathanleclaire
nathanleclaire / machine.py
Created August 7, 2015 18:06
Ansible dynamic inventory plugin for Docker Machine
#!/usr/bin/env python
"""
Example Usage:
$ ansible -i machine.py machinename -m ping
"""
import argparse
import subprocess
@kinifi
kinifi / AutoSave.cs
Created November 3, 2015 19:28
Auto Save the current open Unity 3D level every 30 seconds
/* Created by Chris Figueroa - @Kinifi
* Create a script called AutoSave.cs
*/
using UnityEngine;
using UnityEditor;
using System.Collections;
public class AutoSave : EditorWindow {
@hako
hako / sirius-diy-tutorial.md
Last active January 3, 2026 18:09
Installing Sirius on Mac / Linux / Raspberry Pi

Installing Sirius on Mac / Linux / Raspberry Pi

Tested working on:

  • Raspberry Pi 1 Model B+ (Using Docker hypriot/rpi-python) (debian/wheezy)
  • Raspberry Pi 2 Model B (with virtualenv)
  • Ubuntu Linux x64 (with virtualenv)
  • Ubuntu Linux x64 (Using Docker)
  • OS X Yosemite (with virtualenv)
@brson
brson / Dockerfile
Created May 12, 2016 19:41
Dockerfile for rustup demo
FROM ubuntu:16.04
RUN apt update
RUN apt install build-essential curl -y
RUN apt install file -y
RUN apt install asciinema -y
RUN apt install unzip -y
RUN apt install emacs24-nox -y
RUN apt install vim -y
RUN apt install nano -y
anonymous
anonymous / playground.rs
Created June 20, 2016 11:39
Shared via Rust Playground
// for frank
fn main() {
let bar = [1,2,3];
let mut foo: [u8; 2] = [0, 0];
foo.clone_from_slice(&bar[0..2]);
println!("{:?}", foo);
println!("{:?}", bar);
}
@ericclemmons
ericclemmons / example.md
Last active March 20, 2026 13:00
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
anonymous
anonymous / playground.rs
Created July 25, 2016 09:33
Shared via Rust Playground
fn main() {
let floats = vec![1.0, 2.0, 3.0];
let s: &[f64] = &floats[..];
let string = s.into_iter().map(ToString::to_string).collect::<Vec<_>>().join(",");
println!("{}", string);
}
anonymous
anonymous / playground.rs
Created July 28, 2016 16:49
Shared via Rust Playground
fn main() {
use std::str;
use std::path::Path;
println!("{:?}", "/tmp/bar/foo.txt".as_bytes());
//let buf = "/tmp/bar/foo.txt".as_bytes();
let buf = "C:/temp/foo/bar/foo.txt".as_bytes();
let buf_string = str::from_utf8(buf).unwrap();
//let path = Path::new("/tmp/foo/bar.txt");
@jbolila
jbolila / Dockerfile
Created August 16, 2016 21:14
Postgres latest (9.5) with Rust ready to Diesel_CLI
FROM postgres:latest
MAINTAINER Joao Bolila
ENV LC_ALL=C.UTF-8
RUN apt-get update
RUN apt-get -y install vim silversearcher-ag jq
RUN apt-get -y install build-essential git libsqlite3-dev libpq-dev
RUN cd /tmp ; git clone git://github.com/rkitover/vimpager ; cd vimpager ; make install-deb
@badboy
badboy / Dockerfile
Last active June 1, 2017 11:05
Dockerfile to create janerik/rust-emscripten. See https://hub.docker.com/r/janerik/rust-emscripten
FROM ubuntu:16.04
MAINTAINER Jan-Erik Rediger
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl ca-certificates vim-tiny nano gcc libc6-dev python && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /root/data/rust && \
mkdir -p /root/data/emsdk