Skip to content

Instantly share code, notes, and snippets.

@burningTyger
burningTyger / sencond_deploy.md
Last active August 30, 2017 08:08
How to deploy your openshift app to a second instance

##How to deploy your openshift app to a second instance

I set up Moodle for myself on Openshift which I explained here: https://github.com/burningTyger/openshift_moodle

Now I wanted to install Moodle for a friend who has his own user and his own domain on openshift. Since I'm the admin why bother creating a second app which is basically the exact same app as mine and will most cetainly need the exact same updates. DRY!

So I decided to find out how I can use the app repo on two different instances of openshift. This is how it works (there might be better solutions, let me know):

You log in as the second user and create a new app. This will give you a git URL. Copy this URL and head over to you app repo (Moodle used in this example):

@avoidwork
avoidwork / gist:3749973
Created September 19, 2012 14:29
MySQL sp_split() splits a comma delimited string into a recordset & inserts it into target table or returns it
-- ----------------------------
-- Procedure structure for `sp_split`
-- ----------------------------
DROP PROCEDURE IF EXISTS `sp_split`;
delimiter ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_split`(IN toSplit text, IN target char(255))
BEGIN
# Temp table variables
SET @tableName = 'tmpSplit';
SET @fieldName = 'variable';
@detain
detain / mytop.sh
Last active August 16, 2020 13:59
mytop (Monitor mysql process list with top like screen updates and adiditonal stats like cpu/io usage)
#!/bin/bash
# mytop.sh - (Monitor mysql process list with top like screen updates and adiditonal stats like cpu/io usage)
#
# Sample Output:
#
# CPU Usage 3.29% user 1.60% system 3.37% io wait 0.00% steal 91.59% idle
# Up 17 days 10 hours Load Avg 0.43 0.36 0.35 Processes 1(running) 408(total) Last PID 17825
# +----------+------+-----------+----+---------+------+-------+------------------+
# | Id | User | Host | db | Command | Time | State | Info |
# +----------+------+-----------+----+---------+------+-------+------------------+