Skip to content

Instantly share code, notes, and snippets.

@mkolb
mkolb / gist:2960777
Created June 20, 2012 16:26
queries to fix engage 1.3 migration
drop table mdl_deltak_terms, mdl_deltak_programs, mdl_deltak_master_courses, mdl_deltak_course_mappings, mdl_deltak_section_mappings, mdl_extras;
delete from mdl_capabilities where name='mod/extras:manage_extras';
insert into mdl_capabilities (name,captype,contextlevel,component) values('mod/extras:manage_extras','read','70','mod_extras');
@mkolb
mkolb / gist:2926284
Created June 13, 2012 20:24
pop up in YUI
<script type="text/javascript">// <![CDATA[
YUI().use('node', function(Y) {
function init() {
// The DOM is ready, lets say hello!
say_hello();
}
Y.on("domready", init);
});
@mkolb
mkolb / gist:2910308
Created June 11, 2012 14:24
git stuff I can't remember
# clean up your own junk
git remote prune public
# create a branch based of off a commit
git branch branchname <sha1-of-commit>
# wack a remote branch
git push origin :the_remote_branch
# wack a remote tag
@mkolb
mkolb / gist:2845056
Created May 31, 2012 17:53
emacs stuff i can't remember
M-x diff-buffer-with-file
@mkolb
mkolb / password-salt.el
Created May 21, 2012 16:11
A function for generating a password salt in moodle, useful for first-time creation of config.php
(defun insert-password-salt ()
"Insert a string of length 31 suitable for a new password salt in moodle."
(interactive)
(let ((mycharset "1234567890abcdefghijklmnopqrstyvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()"))
(dotimes (i 31)
(insert (elt mycharset (random (length mycharset)))))))
@mkolb
mkolb / gist:2701188
Created May 15, 2012 11:56
feature/defect workflow
<mkolb> so here's what i want to do for workflow re branches [07:48]
<mkolb> e.g.
<mkolb> Rob gets the idea that he wants to have a chicken separator included
in engage. [07:49]
<hernan43> mechanical or electronic?
@mkolb
mkolb / var_dump-log.php
Last active January 3, 2023 14:53
var_dump into error log
<?php
ob_start();
var_dump($this);
error_log(ob_get_clean());
?>