Skip to content

Instantly share code, notes, and snippets.

View gerred's full-sized avatar
:octocat:

Gerred Dillon gerred

:octocat:
View GitHub Profile
- name: format-mnt-data.service
command: start
content: |
[Unit]
Description=Format the data drive
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/mkfs -t ext4 /dev/xvdb
- name: mnt.mount
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
defmodule Timer do
use GenServer
@interval 10 * 1_000
# Public API
defmodule State do
defstruct caller: nil,
timer: nil
end
defmodule Gabex do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
{:ok, client} = TwitchEx.start_client!
Agent.start_link(fn -> client end, name: ClientServer)
children = [
defmodule Gabex do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
{:ok, client} = TwitchEx.start_client!
Agent.start_link(fn -> client end, name: ClientServer)
children = [
Tirexs.Bulk.store [index: index, refresh: true], @settings do
Enum.each(spool, fn(message) ->
create timestamp: current_timestamp,
user: message.nick,
channel: message.channel,
message: message.message,
meta: json_metadata
end)
end
var gulp = require('gulp')
var atomshell = require('gulp-atom-shell')
var jade = require('gulp-jade')
var browserify = require('browserify')
var vss = require('vinyl-source-stream')
var reactify = require('reactify')
var babelify = require('babelify')
var sass = require('gulp-ruby-sass')
pub struct Point<T> {
pub x: T,
pub y: T
}
impl<T> Point<T> where T: Add<T, Output=T> {
pub fn offset(&self, offset: &Point<T>) -> Point<T> {
Point { x: self.x + offset.x, y: self.y + offset.y }
}
}
use std::io::fs;
fn main() {
fs::copy(&Path::new("terminal.png"), &Path::new(env!("OUT_DIR")))
}
@gerred
gerred / main.rs
Last active August 29, 2015 14:13
#![feature(box_syntax)]
extern crate tcod;
use tcod::{Console};
use tcod::KeyCode;
use tcod::Key::Special;
use bound::Bound;
use point::Point;
use character::Character;
use traits::Updates;