Skip to content

Instantly share code, notes, and snippets.

View bcmiller's full-sized avatar

Bill C. Miller bcmiller

  • emortgagelogic.om
  • arlington, tx
View GitHub Profile
@bcmiller
bcmiller / puppet-tryit.txt
Created April 25, 2012 17:26
puppet-tryit
[email protected]:/mnt/apci/Puppet# ./trytest.sh
info: Loading facts in php_zend_api_no
info: Loading facts in gem_bin_path
info: Loading facts in root_home
info: Loading facts in facter_dot_d
info: Loading facts in root_home
info: Loading facts in facter_dot_d
info: Loading facts in gem_bin_path
info: Loading facts in php_zend_api_no
debug: Executing '/mnt/apci/Puppet/nodes_extlookup.rb a.bcmiller.allplayers.com'
@bcmiller
bcmiller / groups-distro.txt
Created April 13, 2012 18:26
groups-distro
mysql> SELECT COUNT(uid), groups FROM (SELECT count(nid) as groups, ou.uid from og_uid ou INNER JOIN users u on ou.uid = u.uid WHERE u.status = 1 GROUP BY ou.uid) subq GROUP BY groups;;
+------------+--------+
| COUNT(uid) | groups |
+------------+--------+
| 34630 | 1 |
| 14223 | 2 |
| 12062 | 3 |
| 14619 | 4 |
| 1611 | 5 |
| 970 | 6 |
@bcmiller
bcmiller / spaces-calendar.txt
Created April 13, 2012 17:43
spaces-calendar
15:09 acontreras_: bcmiller: i have to run two separate sql's -> SELECT id FROM spaces_overrides WHERE object_id = "spaces_dashboard_custom" AND object_type = "variable" AND value LIKE "%Calendar%" ORDER BY id
15:09 allanc: travist: as a sprint fix that is
15:09 travist_: allanc: sure..
15:09 brooks: allanc: ya I really want to go through the regression doc case by case and clean it all up but I don't think it will need to take up any development time
15:09 acontreras_: bcmiller: and then from the ids -> select * from spaces_overrides where id = {ids} and object_id = "spaces_dashboard-custom-2:reaction:block"
SELECT node.type,title FROM node,spaces_overrides WHERE node.nid=spaces_overrides.id AND object_id = "spaces_dashboard_custom" AND object_type='variable' AND value LIKE '%Calendar%';
@bcmiller
bcmiller / hudson-ruby-issues.txt
Created April 10, 2012 13:30
hudson-ruby-issues.
[email protected]:~# gem install xml-simple addressable highline rest-client activesupport i18n nokogiri ci_reporter
Successfully installed xml-simple-1.1.1
Successfully installed addressable-2.2.7
Successfully installed highline-1.6.11
Successfully installed mime-types-1.18
Successfully installed rest-client-1.6.7
ERROR: Error installing activesupport:
multi_json requires RubyGems version >= 1.3.6
Successfully installed i18n-0.6.0
Building native extensions. This could take a while...
Prod:
mysql> select distinct (field_user_gender_value) from content_field_user_gender;+-------------------------+
| field_user_gender_value |
+-------------------------+
| 1 |
| 2 |
+-------------------------+
2 rows in set (0.51 sec)
@bcmiller
bcmiller / pdup-overridden.txt
Created March 27, 2012 19:56
pdup-overriden
root@pdup-ap:/mnt/apci/main/www# drush -y fra
Name Feature Status State
APCI Admin Lite Feature apci_admin_lite_feature Enabled
Auto Schedule Events apci_auto_schedule_events Enabled
Tournament Brackets apci_brackets Enabled
APCI Broadcast Messaging apci_broadcast_messaging Enabled
APCI Brochure apci_brochure Enabled
apci_calendar apci_calendar Enabled
YES apci_centex_yes Disabled
APCI Commerce apci_commerce Enabled
@bcmiller
bcmiller / pre-commit
Created March 16, 2012 18:28
pre-commit
#!/bin/sh
# Place as .git/hooks/pre-commit
#Reject any commit that would have PHP syntaz errors on .php , .module, .install, .inc files
####
# Reject any commit that would add a line with tabs.
#
# You can enable this as a repo policy with
#
# git config hooks.allowtabs true
####
@bcmiller
bcmiller / fd.txt
Created March 12, 2012 21:05
fd.txt
Code: drush features-revert will remove the overrides.
Overrides: drush features-update will update the exported feature with the displayed overrides
Component: field
'type' => 'commerce_group_cart_add_to_cart_form',
'weight' => '5',
> ),
> 'donation_teaser' => array(
> 'label' => 'above',
@bcmiller
bcmiller / gist:1996480
Created March 7, 2012 21:55
from an email
The way I'd see it working is:
Use notifications api to define templates etc for your email
When you reach the point in your app where you send the email, add the email send request to the notifications queue.
Write a drush command which processes your queue
Implement drush daemon which monitors the queue at a configurable interval (1second+) and if it finds any items on it, sends them
@bcmiller
bcmiller / puppet-try.
Created March 6, 2012 17:50
puppet-try
[email protected]:/mnt/apci/Puppet# puppet apply --modulepaapci/Puppet/modules ./manifests/site.pp --debug --verbose
info: Loading facts in php_zend_api_no
info: Loading facts in root_home
info: Loading facts in facter_dot_d
info: Loading facts in gem_bin_path
info: Loading facts in php_zend_api_no
debug: template[inline]: Bound template variables for inline template in 0.00 seconds
debug: template[inline]: Interpolated template inline template in 0.00 seconds
debug: importing '/mnt/apci/Puppet/modules/truth/manifests/enforcer.pp' in environment production
debug: Automatically imported truth::enforcer from truth/enforcer into production