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 | |
GITLOG="/var/log/equella/cron-update.log" | |
LOGFILE="/tmp/equellacodeupdate.log" | |
HTMLFILE="/tmp/equellacodeupdate.html" | |
EMAILADDR="[email protected]" | |
FROMEMAILADDR="[email protected]" | |
SUBJECT="EQUELLA code" | |
EQSRC=/var/equella-source/ |
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
echo `pwd`/proxy.lua | |
mysql-proxy --proxy-lua-script=`pwd`/proxy.lua --log-level=debug |
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 | |
# Your github username | |
github_user="dcai" | |
# The remote name of your github repo, it usually origin | |
github_remote_name="github" | |
### STOP CONFIG SINCE HERE! ### | |
github_diff_root="https://github.com/$github_user/moodle/compare/" |
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
<?php | |
https://gist.github.php | |
?> |
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
<xml> | |
<script/> | |
<integration> | |
<moodlecoruseidnumber/> | |
<moodlecourseid>2</moodlecourseid> | |
<moodlecourseshortname>M101</moodlecourseshortname> | |
<moodlecoursefullname>Moodle 101</moodlecoursefullname> | |
</integration> | |
<item id="ee50ebe5-82a2-45d7-9868-9ac305a49670" itemdefid="2a6022ef-7947-47c6-bb6d-b1b9c2bbbba4" itemstatus="live" key="1287" moderating="false" version="1"> | |
<itembody> |
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 | |
# https://gist.github.com/dcai/3847582/ | |
[[ -r /etc/bash_completion ]] && source /etc/bash_completion | |
# TERM COLOR | |
export WHITE="\033[1;37m" | |
export YELLOW="\033[1;33m" | |
export GREEN="\033[1;32m" |
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
VBoxManage setextradata global GUI/Customizations noMenuBar,noStatusBar | |
VBoxManage setextradata global GUI/Customizations MenuBar,StatusBar |
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
# Author: Dongsheng Cai | |
# | |
# Gist: https://gist.github.com/dcai/3824286 | |
# | |
# c-d to close shell | |
# <prefix> s to switch to another session | |
# <prefix> f to find a window | |
# <prefix> o to switch to another panel | |
# <prefix> ! to close other panes except current one | |
# <prefix> x Kill the current pane |
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
sudo asr restore -source /Volumes/saturn/Software/InstallESD.dmg -target /Volumes/InstallOSX/ -erase -noverify --noprompt |
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
# 2010-10-02 14h00 | |
# Update created field in user_prefs table | |
def migrate(db): | |
with db.select('user_id, created', from_='users'): | |
all_users = db.fetchall() | |
for user in all_users: | |
with db.update('user_prefs') as obj: | |
obj.created = user['created'] | |
db.where('user_id = %s', user['user_id']) |