Skip to content

Instantly share code, notes, and snippets.

digitalMoksha digitalmoksha

Block or report user

Report or block digitalmoksha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
digitalmoksha / travis.yml
Created Jun 9, 2019
Sample `.travis.yml` for running test on Ruby/Rubymotion gems
View travis.yml
# test against both regular Ruby and RubyMotion
language: ruby
- bundler
# latest stable/supported versions
- 2.4.6
- 2.5.5
- 2.6.3
# digitalmoksha - added the ability to show the repos email address
# If you would like to the email address used to commit code, then you can set
# GIT_PS1_SHOWEMAIL to a nonempty value.
# bash/zsh git prompt support
# Copyright (C) 2006,2007 Shawn O. Pearce <>
# Distributed under the GNU General Public License, version 2.0.
# This script allows you to see repository status in your prompt.

Keybase proof

I hereby claim:

  • I am digitalmoksha on github.
  • I am digitalmoksha ( on keybase.
  • I have a public key ASDyGludJYeVdnN3qjMPN0Ar_x4MQ89X8P6nHBG7eeQy6go

To claim this, I am signing this object:

View merge_git_repos.rb
#!/usr/bin/env ruby
# Merge multiple git repositories into a new one.
# Users `git filter-branch` to rewrite paths, so that `git log` works seamlessly
# Built from the script at
new_repo = '/tmp/new_repo'
base = ''
dest_branch = 'master'
digitalmoksha / backupsql.rb
Last active Aug 20, 2016
Backup MySQL databases and sync to S3
View backupsql.rb
#!/usr/bin/env ruby
# Backup specified databases - place in a cron job
# Previously we used sftp to save files to a remote server.
# Now sync directly with a bucket on AWS S3
# Use a MySQL configuration file (.cnf) to store the password, so that it doesn't
# appear in the process list
# example.cnf
digitalmoksha / gist:051a00c1448395f1be4a
Created Feb 19, 2015
Attempts to demonstrate a potential issue with regular expressions between Ruby and RubyMotion
View gist:051a00c1448395f1be4a
# The following code attempts to demonstrate a potential issue with regular
# expressions between Ruby and RubyMotion.
# The expression is supposed to match the text before an end of block character (^)
# So
# x =
# ^
# should only return the first line, while
digitalmoksha / svn_autocommit.rb
Created Jul 10, 2014
Add / Remove / Commit files to subversion (svn) automatically
View svn_autocommit.rb
#!/usr/bin/env ruby
def usage
puts ""
puts "usage: #{File.basename( __FILE__ )} [-t] PATH"
puts ""
puts "Automatically commits the changes of svn working copy located in PATH."
You can’t perform that action at this time.