Skip to content

Instantly share code, notes, and snippets.

View christianchristensen's full-sized avatar

Chris Christensen christianchristensen

View GitHub Profile
@christianchristensen
christianchristensen / sendmail.php
Created November 12, 2011 05:16
Drupal quickstart sendmail/email .txt dump script
#!/usr/bin/php
<?php
$content = file_get_contents('php://stdin');
preg_match('|^To: (.*)|', $content, $address);
$filename = "/home/quickstart/websites/logs/mail/" . date('Y-m-d_H:i:s') . '--' . $address[1] . '.txt';
file_put_contents($filename, $content);
chmod($filename, 0666);
exit();
?>
@christianchristensen
christianchristensen / .gitignore
Created November 21, 2011 17:43
Git ignore file for committing hudson/jenkins configs to version control.
*.log
jobs/*/workspace
jobs/*/builds
jobs/*/lastStable
jobs/*/lastSuccessful
jobs/*/nextBuildNumber
updates
.owner

Responsive design

  • mediaqueri.es
  • Progressive CSS
  • Feature detection (JS - modernize)
  • front-end reverse proxy ignorance
  • polyfill... JS shim that makes ie work
  • mediaquery polyfills
  • respond.JS
jQuery(".jp-play").click(function(){
jQuery('div#right').replaceWith('<h2>New heading</h2>');
});
jQuery(".jp-play").click(function(event){
// Do some work to figure out what "row" event was from
jQuery.ajax({
// use the URL in "context" of event
url: "http://annafermin.com/drupal/music-and-more/love-blooms",
success: function(data) {
#include <stdio.h>
main(t,_,a)
char *a;
{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a
)&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,
t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\
,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\
+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\
@christianchristensen
christianchristensen / OAuth_notes.mkd
Created January 11, 2012 17:25
OAuth'in with Drupal
  • Consumer: client
  • Service Provider: server
  • User: resource owner
  • Consumer Key and Secret: client credentials
  • Request Token and Secret: temporary credentials
  • Access Token and Secret: token credentials
@christianchristensen
christianchristensen / gist:1596931
Created January 11, 2012 21:45
Drupal (current version) with Symfony

No longer would programs be declared complete in order to meet schedules, requiring the users to work around errors. Instead quality would be the primary consideration. - Tindall to multiple addresses, "A New Spacecraft Computer Program Development Working Philosophy is Taking Shape," memo, 67-TM-1-39, May 17, 1967


In the end, the success of the Shuttle's software development was due to the conceptual integrity established by using rigorously maintained requirements documents. The requirements phase is the beginning of the software life cycle, when the actual functions, goals, and user interfaces of the eventual software are determined in full detail. If a team of a thousand workers was asked to set software requirements, chaos would result. On the other hand, if few do the requirements but many can alter them later, then chaos would reign again. The strategy of using a few minds to create the software architecture and interfaces and then ensuring that their ideas and theirs alone are im- plement