This file contains hidden or 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 static org.junit.Assert.*; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.mockito.Mockito.*; | |
import static org.mockito.BDDMockito.*; | |
import org.hamcrest.BaseMatcher; | |
import org.hamcrest.Description; | |
import org.hamcrest.Matcher; |
This file contains hidden or 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
#!/bin/sh | |
# For installation and usage, please refer to my blog post: | |
# http://derekstavis.github.io/posts/creating-a-installer-using-inno-setup-on-linux-and-mac-os-x/ | |
# | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 Derek Willian Stavis | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
This file contains hidden or 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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.6.+' | |
} | |
} | |
apply plugin: 'android' |
This file contains hidden or 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
package com.mediaarc.gradle.plugins | |
import org.gradle.api.* | |
import org.gradle.api.plugins.* | |
import org.gradle.api.tasks.* | |
class CalabashPlugin implements Plugin<Project> { | |
void apply(Project project) { | |
project.extensions.create("calabash", CalabashPluginExtension) |
This file contains hidden or 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
#!/bin/bash | |
BACKUP_ROOT="$HOME/redmine_backup" | |
REDMINE_ROOT="/var/www/redmine" | |
BACKUP_FILENAME='backup_redmine_'`date +%Y%m%d`'.tar.bz2' | |
DB_DUMP_FILENAME='db_redmine_'`date +%Y%m%d`'.sqlc' | |
if [ ! -d "$BACKUP_ROOT" ]; then | |
mkdir $BACKUP_ROOT | |
fi |
This file contains hidden or 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 merge(first_id, second_id) | |
first = Article.find(first_id) | |
if Article.exists?(second_id) | |
second = Article.find(second_id) | |
else | |
false | |
end |
This file contains hidden or 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 string | |
import random | |
size = 2500 # or whatever lenght you want your random string to be | |
allowed = string.ascii_letters # add any other allowed characters here | |
randomstring = ''.join([allowed[random.randint(0, len(allowed) - 1)] for x in xrange(size)]) | |
print randomstring |
This file contains hidden or 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
# exe_packager.rb : find all dependencies for a given EXE and package it in | |
# a zip file | |
require 'csv' | |
require 'zip/zip' | |
require 'zippy' | |
ARGV.each do |exe_file| | |
short_filename = File.basename(exe_file, '.exe') |
This file contains hidden or 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
#Need some place to keep this... | |
git config --global user.name "Etienne Savard" | |
git config --global user.email [email protected] | |
git config --global color.branch auto | |
git config --global color.diff auto | |
git config --global color.interactive auto | |
git config --global color.status auto |
NewerOlder