Skip to content

Instantly share code, notes, and snippets.

View rfay's full-sized avatar

Randy Fay rfay

View GitHub Profile
@rfay
rfay / Moving a release tag
Created February 18, 2011 21:21
JUNK: experimental
rfay@rfay-bigsony:/tmp/amazon2$ git tag 6.x-1.0
fatal: tag '6.x-1.0' already exists
rfay@rfay-bigsony:/tmp/amazon2$ git help tag
rfay@rfay-bigsony:/tmp/amazon2$ git tag -f 6.x-1.0
Updated tag '6.x-1.0' (was c0d5ebb)
rfay@rfay-bigsony:/tmp/amazon2$ git push 6.x-1.0
fatal: '6.x-1.0' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
rfay@rfay-bigsony:/tmp/amazon2$ git push origin 6.x-1.0
rfaytest@git-testing.drupal.org's password:
@rfay
rfay / clean_branches.php
Created February 19, 2011 23:37
Migration day code to requeue branch tests See http://drupal.org/node/1057146
<?php
/**
* On Git migration day we have to clean out the existing tests of
* testable branches so they can be tested again. The ones that will already be
* there on QA are all not testable.
*
* This is a translation of the pseudocode in
* http://drupal.org/node/1057146#comment-4073288
*
* It seems to work, and if I'm not mistaken it won't do any damage, but would
@rfay
rfay / push_into_new_branch.txt
Created February 28, 2011 04:42
I got this error when pushing 7.x-1.x branch
rfay@rfay-bigsony:/tmp/git_migration_dummy$ git commit -m "First file in 7.x"
[7.x-1.x 8298f34] First file in 7.x
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 README.txt
rfay@rfay-bigsony:/tmp/git_migration_dummy$ git push origin 7.x-1.x
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 313 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
@rfay
rfay / default (nginx 0.8.54)
Created March 16, 2011 04:39
default for /etc/nginx/sites-available when using 0.8.54
server {
listen 80;
#server_name ~^($<domain>.*)\.l\/.*$;
server_name ~^(www\.)?(?<domain>.+)\.l$;
root /home/rfay/workspace/$domain;
allow all;
# Very rarely should these ever be accessed outside of your lan
Add 8.x to project_release_active_compatibility_tids
update variable set value="a:12:{i:103;i:103;i:87;i:87;i:78;i:78;i:79;i:79;i:80;i:0;i:81;i:0;i:82;i:0;i:83;i:0;i:84;i:0;i:85;i:0;i:86;i:0;i:7234;i:7234;}" where name="project_release_active_compatibility_tids"
Then add 7234 to pift_core
Notes about debugging status:
/**
* Generate step map and confirmation step map.
*/
public function init() {
$i = $j = 1;
foreach ($this->steps as $step => $info) {
$this->map[$i++] = $step;
if ($info['confirmation'] !== FALSE) {
$this->confirmation_map[$j++] = $step;
}
$result = db_queryd('SELECT f.fid, f.filepath, u.nid AS u_nid, cu.nid AS c_nid, cu.cid AS c_cid
FROM {pift_test} t
JOIN {files} f
ON (t.type = %d AND t.id = f.fid)
LEFT JOIN {upload} u
ON f.fid = u.fid
LEFT JOIN {comment_upload} cu
ON f.fid = cu.fid
WHERE t.status = %d
LIMIT %d', PIFT_TYPE_FILE, PIFT_STATUS_QUEUE, PIFT_XMLRPC_MAX);
@rfay
rfay / Hacked_ajax_example.php
Created April 4, 2011 04:21
Hacked to show sequence of events in AJAX
/**
* A very basic form which with an AJAX-enabled submit.
*
* On submit, the markup in the #markup element is updated.
*/
function ajax_example_submit_driven_ajax($form, &$form_state) {
if (empty($form_state['sequence'])) {
$form_state['sequence'] = 0;
}
We couldn’t find that file to show.
@rfay
rfay / .gitconfig
Created April 12, 2011 04:12 — forked from schacon/.gitconfig
insteadOf Example for git.drupal.org
# Put this in your .gitconfig
[url "http://git.drupal.org/project/"]
insteadOf = "do:"