This file contains 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 | |
ob_start(); | |
var_dump($this); | |
error_log(ob_get_clean()); | |
?> |
This file contains 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
<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? |
This file contains 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
(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))))))) |
This file contains 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
M-x diff-buffer-with-file |
This file contains 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
# 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 |
This file contains 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
<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); | |
}); |
This file contains 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
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'); |
This file contains 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
for tbl in`psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" YOUR_DB`; do psql -c "alter table $tbl owner to NEW_OWNER" YOUR_DB ; done | |
for tbl in`psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" YOUR_DB`; do psql -c "alter table $tbl owner to NEW_OWNER" YOUR_DB ; done | |
for tbl in`psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" YOUR_DB`; do psql -c "alter table $tbl owner to NEW_OWNER" YOUR_DB ; done |
This file contains 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
select distinct mc.shortname as course_id, mr.shortname as role, mu.username as loginname, mcon.contextlevel | |
from mdl_user_enrolments mue | |
join mdl_enrol me on mue.enrolid=me.id | |
join mdl_user mu on mue.userid=mu.id | |
join mdl_course mc on me.courseid=mc.id | |
join mdl_role_assignments mra on mu.id=mra.userid | |
join mdl_role mr on mra.roleid=mr.id | |
join mdl_context mcon on mcon.instanceid=mc.id where mr.shortname='student' order by mc.shortname and mu.username=’craigl’; | |
-- yields |
OlderNewer