Skip to content

Instantly share code, notes, and snippets.

function fpu_secret_page_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'view':
if ($node->nid == 2) {
if (!user_is_logged_in()) {
if ((!isset($_GET["ident"]) || $_GET["ident"] !== "c0lk3y") || (!isset($_GET["auth"]) || $_GET["auth"] != "k3rb3r0ssyph0n")) {
drupal_access_denied();
}
}
}
drush site-install my_profile --site-name=mysite --account-name=admin --account-pass=admin --db-url=mysql://root:root@localhost/mysitedb --y --v
WD system: state_machine module enabled. [info]
WD ctools: Plugin state_flow of plugin type state_flow:plugins points to nonexistent file [notice]
profiles/my_profile/modules/contrib/state_machine/modules/state_flow/StateFlow.class.php for class handler handler.
WD system: state_flow module installed. [info]
WD system: state_flow module enabled. [info]
WD ctools: Plugin state_flow of pl
@kepford
kepford / seminary.fresno.edu.conf
Created April 2, 2012 18:30
Apache Vhost for seminary.fresno.edu
<VirtualHost *:80 *:443>
ServerAdmin webmaster@localhost
ServerName seminary.fresno.edu
ServerAlias www.seminary.fresno.edu
ServerAlias seminary.fpu.edu
ServerAlias www.seminary.fpu.edu
RewriteEngine On
# ----------------------------------------------------------------------------------------- #
# ---------- Make sure that the user is using SSL for sensitive areas --------------------- #
<?php
/**
* Implements hook_install().
*
* Perform actions to set up the site for this profile.
*/
function btsa_profile_install() {
$themes['theme_default'] = variable_get('btsa_theme_default', 'bartik');
$themes['admin_theme'] = variable_get('btsa_admin_theme', 'seven');
drush vset install_profile minimal
Enter a number to choose which variable to set.
[0] : Cancel
[1] : install_profile
1
install_profile was set to minimal [success]
o1@server2:~/static/theweeklydrop.com-2012-03-03-2038/sites/theweeklydrop.com$ drush vget
install_profile
install_profile: "default"
<script type="text/javascript">
google.load('search', '0', {language : 'en'});
google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl('012175768895571244741:5zxvz8g5isy');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
var options = new google.search.DrawOptions();
options.setAutoComplete(true);
customSearchControl.draw('cse', options);
//$(".gsc-input").val("<?php echo $_POST['as_q']; ?>");//insert into search field requested search text
//$('.gsc-input').focus();//give search box focus
<div id="cse" style="width: 100%;">Loading</div>
<script src="https://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '0', {language : 'en'});
google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl('012175768895571244741:5zxvz8g5isy');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
var options = new google.search.DrawOptions();
options.setAutoComplete(true);
customSearchControl.draw('cse', options);
<div id="cse" style="width: 100%;">Loading</div>
<script src="https://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '0', {language : 'en'});
google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl('012175768895571244741:5zxvz8g5isy');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
var options = new google.search.DrawOptions();
options.setAutoComplete(true);
customSearchControl.draw('cse', options);
@kepford
kepford / duplicity_backup.sh
Created March 8, 2012 16:11 — forked from anonymous/duplicity_backup.sh
duplicity_backup by mig5
#!/bin/bash
# Duplicity Backup script
# written by mig5
# Functions that define which API to use
function amazon_s3() {
export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXX
export AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXX
Vagrant::Config.run do |config|
config.vm.share_folder("platforms", "/var/aegir/platforms/.", "../platforms", :owner => "aegir", :group => "www-data")
config.vm.share_folder("builds", "/var/aegir/builds", "../builds", :owner => "aegir", :group => "aegir")