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 | |
#=================================================================================== | |
# ubuntu_devenv.sh | |
# http://symbiosoft.net/ubuntu_devenv | |
# | |
# (K)UBUNTU - POST INSTALLATION SCRIPT THAT SETUP A DEVELOPER ENVIRONMENT | |
# | |
# TODOLIST | |
#---------------------------------------------------------------------------------- | |
# - Simulation (no changes) |
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
# --------- | |
# Prompt | |
# --------- | |
function gitprompt { | |
blue='\[\e[0;34;1m\]' | |
red='\[\e[0;38;1m\]' | |
green='\[\e[0;32;1m\]' | |
none='\[\e[0m\]' | |
prompt_info="" |
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 |
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
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
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
#!/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
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.6.+' | |
} | |
} | |
apply plugin: 'android' |
OlderNewer