Skip to content

Instantly share code, notes, and snippets.

View arnihermann's full-sized avatar
💭
¯\_(ツ)_/¯

Árni Hermann Reynisson arnihermann

💭
¯\_(ツ)_/¯
View GitHub Profile
@arnihermann
arnihermann / python2.6 for homebrew
Created April 16, 2012 13:44 — forked from cspanring/python2.6 for homebrew
Python 2.6.x Homebrew Formula
require 'formula'
<<-COMMENTS
This is the Homebrew formula for Python.
Versions
--------
This formula is currently tracking version 2.6.x.
@arnihermann
arnihermann / pyrocfile.py
Created April 16, 2012 11:21 — forked from asenchi/pyrocfile.py
pyrocfile - 100 line Procfile manager in Python
# Pyrocfile - Simple Python impementation of Procfile manager
# Written by Chris Testa (http://testa.co/) in 2011
# Released in the Public Domain
import argparse, logging, os.path, random, re, select, signal, subprocess
def _new_logger(name, color=None):
logger = logging.getLogger(name)
hdlr = logging.StreamHandler()
color, end_color = '\033[9%dm' % (color or random.randint(1, 6)), '\033[0m'
@arnihermann
arnihermann / brew-services.rb
Created April 16, 2012 11:20 — forked from bryanveloso/brew-services.rb
External script for homebrew to simplify starting services via launchctl, out of the box support for any formula which implements #startup_plist. (This version fixes the deprecation warning raised on Formula.resolve_alias.)
#!/usr/bin/env ruby -w
# brew-services(1) - Easily start and stop formulas via launchctl
# ===============================================================
#
# ## SYNOPSIS
#
# [<sudo>] `brew services` `list`<br>
# [<sudo>] `brew services` `restart` <formula><br>
# [<sudo>] `brew services` `start` <formula> [<plist>]<br>
@arnihermann
arnihermann / hack.sh
Created March 31, 2012 19:48 — 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
#
➜ git-plugin git:(master) mvn clean package
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.jenkinsci.plugins:git:1.1.16-SNAPSHOT (/Users/arnihermann/Packages/git-plugin/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find org.jenkins-ci.plugins:plugin:pom:1.398 in http://download.eclipse.org/jgit/maven was cached in the local repository, resolution will not be reattempted until the update interval of jgit-repository has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 3, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
@arnihermann
arnihermann / dwelling.scala
Created November 30, 2010 20:02
List can be used for non-deterministic computation -- this gist shows a simple example ported to lists comprehension from http://jim-mcbeath.blogspot.com/2010/11/nondeterministic-evaluation-in-scala.html
import scala.math.abs
def distinct(vals: List[Int]): Boolean = vals.distinct.length == vals.length
val floors = List(1,2,3,4,5)
val solution = for {
baker <- floors
cooper <- floors
fletcher <- floors
miller <- floors
from django.utils.html import escape
from django.utils.safestring import mark_safe
from django.forms.util import flatatt
class ReadOnlyWidget(forms.Widget):
def render(self, name, value, attrs):
final_attrs = self.build_attrs(attrs, name=name)
if hasattr(self, 'initial'):
value = self.initial
return mark_safe("<p %s>%s</p>" % (flatatt(final_attrs), escape(value) or ''))
Utterance
+ Clause
+ Theme
+ Subject
- Ég
+ Action
- sá
+ Rheme
+ Subject
+ Constituent (ADJECTIVE_PHRASE)
Utterance
+ Clause
+ Theme
+ Constituent (NOUN_PHRASE)
- I
+ Constituent (VERB_PHRASE)
- saw
+ Rheme
+ Constituent (NOUN_PHRASE)
- a
Utterance
+ Clause
+ Theme
+ Constituent (NOUN_PHRASE)
- I
+ Constituent (VERB_PHRASE)
- saw
+ Rheme
+ Constituent (NOUN_PHRASE)
- a