Skip to content

Instantly share code, notes, and snippets.

View elbart's full-sized avatar
🦀
Rustacean

Tim Eggert elbart

🦀
Rustacean
View GitHub Profile
@elbart
elbart / nixos-from-ubuntu.md
Last active September 16, 2021 14:55 — forked from mlaventure/nixos-from-ubuntu.md
How to install NixOS from an Ubuntu liveCD
@elbart
elbart / lib.rs
Last active June 23, 2020 15:57
rs playground data structures
use std::cell::RefCell;
#[derive(Debug)]
struct YakeTarget<'a> {
pub name: String,
pub dependencies: Option<Vec<&'a YakeTarget<'a>>>,
}
#[derive(Debug)]
struct Yake<'a> {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Child Domain</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.0/js.cookie.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jschannel/1.0.0-git-commit1-8c4f7eb/jschannel.min.js"></script>
</head>
<body>

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
def partition(n, vec):
@elbart
elbart / gist:3017650
Created June 29, 2012 12:29 — forked from keimlink/gist:831633
Startup script for the Supervisor server (RHEL)
#!/bin/bash
#
# Startup script for the Supervisor server
#
# Tested with Red Hat Enterprise Linux Server release 5.5
#
# chkconfig: 2345 85 15
# description: Supervisor is a client/server system that allows its users to \
# monitor and control a number of processes on UNIX-like \
# operating systems.
@elbart
elbart / a.md
Created June 29, 2012 08:50 — forked from rkh/a.md

This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:

  • Netflix
  • Hulu / HuluPlus
  • CBS
  • ABC
  • MTV
  • theWB
  • CW TV
  • Crackle
@elbart
elbart / hack.sh
Created April 2, 2012 15:28 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@elbart
elbart / GuiceResource.java
Created October 18, 2011 20:12
Maven jetty guice jersey example
package com.elbart;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import com.google.inject.servlet.RequestScoped;
@Path("bound/perrequest")