Skip to content

Instantly share code, notes, and snippets.

View rfay's full-sized avatar

Randy Fay rfay

View GitHub Profile
$("body").css('background-color', 'blue');
@rfay
rfay / A second file
Created February 9, 2011 05:31
testing this vimrc
1. The watchdog() in the user_block_user was using $user without initializing.
2. The bug I'm actually working on (inability to assign).
@rfay
rfay / Shared branch workflow for sandboxes
Created February 12, 2011 05:50
This is a "big feature" long-running workflow, with multiple collaborators
Sandboxes can be used for many things, and one of the things they will be used for is for teams collaborating on larger projects, or adding large features to existing modules, etc.
In that situation we have a couple of new complexities:
* We (possibly) have multiple collaborators who can commit.
* If this is a feature of an existing project we will occasionally have to sync it up with that project so we don't have a massive soul-crushing merge when the time comes to do so.
This is one possible workflow for this situation:
1. Create a new sandbox on drupal.org. Mine will be named my_views_feature, and it will be a new feature for the views project. The commmitter URL will be ssh://rfay@git-testing.drupal.org:2222/sandbox/rfay/1056659.git.
@rfay
rfay / Shared branch workflow for sandboxes
Created February 12, 2011 05:52
This is for a long-running feature with multiple collaborators... and a moving project behind it.
Sandboxes can be used for many things, and one of the things they will be used for is for teams collaborating on larger projects, or adding large features to existing modules, etc.
In that situation we have a couple of new complexities:
* We (possibly) have multiple collaborators who can commit.
* If this is a feature of an existing project we will occasionally have to sync it up with that project so we don't have a massive soul-crushing merge when the time comes to do so.
This is one possible workflow for this situation:
1. Create a new sandbox on drupal.org. Mine will be named my_views_feature, and it will be a new feature for the views project. The commmitter URL will be ssh://rfay@git-testing.drupal.org:2222/sandbox/rfay/1056659.git.
@rfay
rfay / gist:823558
Created February 12, 2011 05:54
Workflow for long-running fork

Sandboxes can be used for many things, and one of the things they will be used for is for teams collaborating on larger projects, or adding large features to existing modules, etc.

In that situation we have a couple of new complexities:

  • We (possibly) have multiple collaborators who can commit.
  • If this is a feature of an existing project we will occasionally have to sync it up with that project so we don't have a massive soul-crushing merge when the time comes to do so.

This is one possible workflow for this situation:

  1. Create a new sandbox on drupal.org. Mine will be named my_views_feature, and it will be a new feature for the views project. The commmitter URL will be ssh://rfay@git-testing.drupal.org:2222/sandbox/rfay/1056659.git.
@rfay
rfay / .gitignore
Created February 14, 2011 19:01
DC forced push
.DS_Store
._*
*~
*.kpf
*.swp
*.swo
// Attempt to determine the Drupal core API version.
$api = array();
foreach ($branch->taxonomy as $tid => $term) {
if (in_array($tid, $api_versions)) {
$api['version'] = array_shift(explode('.', $term->name, 2));
$api['tid'] = $term->tid;
break;
}
}
CentOS release 5.5 (Final)
[rfay@scratchvm tmp]$ git clone git://git.drupal.org/project/examples -b 6.x-1.x
error: unknown switch `b'
usage: git-clone [options] [--] <repo> [<dir>]
-n, --no-checkout don't create a checkout
--bare create a bare repository
--naked create a bare repository
-l, --local to clone from a local repository
--no-hardlinks don't use local hardlinks, always copy
@rfay
rfay / Problems with patch p detection
Created February 18, 2011 04:07
This is the PIFR code that deals with applying the patch and then getting what files were changed by it.
public function apply($patch) {
return pifr_client_review::exec("patch -p1 -i $patch");
}
public function get_changed_files($patch) {
$contents = file_get_contents($patch);
// This regex looks through the patch file for lines of the format
// +++ b/install.php
// and removes the '+++ b/' from them, returning the filenames that have
// had content added.
@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: