This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if `ant -version` !~ /version (\d+)\.(\d+)\.(\d+)/ || $1.to_i < 1 || ($1.to_i == 1 && $2.to_i < 8) | |
puts "ANT version 1.8.0 or later required. Version found: #{$1}.#{$2}.#{$3}" | |
exit 1 | |
end | |
require 'time' | |
def manifest() @manifest ||= REXML::Document.new(File.read(MANIFEST_FILE)) end | |
def package() manifest.root.attribute('package') end | |
def build_project_name() @build_project_name ||= REXML::Document.new(File.read('build.xml')).elements['project'].attribute(:name).value end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def config | |
# in this Rakefile we can allow that | |
$config ||= Hash.new | |
end | |
# ADB command to be invoked when installing *.apk | |
config['adb'] = 'adb' | |
# Version | |
config['version'] = '1.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[8pt]{memoir} | |
\usepackage[utf8]{inputenc} | |
\usepackage[paperwidth=9cm, paperheight=11.5cm, top=0.5cm, left=0.5cm, right=0.5cm, bottom=0.5cm]{geometry} | |
\usepackage{graphicx} | |
\usepackage{tikz, blindtext} | |
\makechapterstyle{box}{ | |
\renewcommand*{\printchaptername}{} | |
\renewcommand*{\chapnumfont}{\normalfont\sffamily\huge\bfseries} | |
\renewcommand*{\printchapternum}{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## place this in your .profile | |
## For example, | |
## ☺ is a clean repository. | |
## o_O means there are changes. | |
## O_o means there are staged but not commit changes. | |
## ☼ means nothing to show for | |
function parse_git_dirty { | |
D="$(git status 2> /dev/null | tail -n1 | awk '{ print $1 }' )" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\ProvidesClass{mydiss}[2012/08/22 v1.3 mydiss class (Michael Ummels)] | |
\NeedsTeXFormat{LaTeX2e}[1996/06/01] | |
% Options | |
\newif\if@iso | |
\@isofalse | |
\newif\if@crop | |
\@cropfalse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Random; | |
public class ItemsPlacement { | |
// Area where we will placing parts | |
static class Area { | |
int x = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tasks with arguments | |
task :taskname, :argument do |t, args| | |
message = args[:argument] || 'Hello' | |
puts message | |
end | |
# Tasks in namespaces | |
namespace :namespacename do | |
task :taskname, :argument do |t, args| | |
message = args[:argument] || 'Hello' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# A C Parser using the Parslet library. | |
# | |
# ANSI C Grammar: | |
# | |
# * http://www.lysator.liu.se/c/ANSI-C-grammar-l.html | |
# * http://www.lysator.liu.se/c/ANSI-C-grammar-y.html | |
# | |
require 'parslet' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For those of you who get this error after upgrading to mountain lion: | |
Installing rmagick (2.13.1) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/Users/user/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby extconf.rb | |
checking for Ruby version >= 1.8.5... yes | |
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config. | |
checking for /usr/bin/gcc-4.2... no |