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
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
cache:
- bundler
# latest stable/supported versions
rvm:
- 2.4.6
- 2.5.5
- 2.6.3
View git-prompt.sh
# 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 <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
View keybase.md

Keybase proof

I hereby claim:

  • I am digitalmoksha on github.
  • I am digitalmoksha (https://keybase.io/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 http://dominik.honnef.co/posts/2016/04/merging-git-repositories/
#------------------------------------------------------------------------------
new_repo = '/tmp/new_repo'
base = 'git@github.com:customer'
dest_branch = 'master'
@digitalmoksha
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
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 = Class.new
# ^
#
# should only return the first line, while
@digitalmoksha
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.