Skip to content

Instantly share code, notes, and snippets.

View delphian's full-sized avatar

delphianQ delphian

  • Hesperia, CA
View GitHub Profile
@delphian
delphian / gist:6177336
Created August 7, 2013 19:00
Overwrite regex matched files from one branch to another using git diff.
git diff master --name-only | grep -E '(css|sass)' | xargs -I{} git checkout master {}
@delphian
delphian / install-drupal-db-and-core.sh
Last active September 16, 2019 13:35
Drupal site install script to install Drupal database and core. Enable and disable favorable contrib modules.
#!/bin/bash
# Site install script that will download the latest version of drupal, create
# a database in mysql, use drush to perform a site install, download
# and enable some handy contrib modules, and disable a few annoying
# core module.
#
# Copy and paste this into a shell to execute:
# curl -s https://gist.github.com/delphian/6043424/raw/ | bash
#
@delphian
delphian / drush-rebuild-site-make.sh
Created July 18, 2013 10:58
Rebuild the drush site make file.
# Remove the directories we are rebuilding
tar -czf /tmp/drush-backup-`date +%Y%m%d%H%M%S`.tar.gz modules libraries
rm -rf ./modules/contrib ./libraries
# Pull down the new code
drush make --yes --no-core --working-copy --contrib-destination=. ./site.make
@delphian
delphian / drush-example-site.make
Last active September 27, 2019 18:16
Example drupal drush site.make file for automatically downloading modules, themes, profiles, and libraries
; @file drush-example-site.make
; @author Bryan Hazelbaker <[email protected]>
;
; @brief Drush make file to be processed by the `drush make` command
;
; @details Running drush make on this configuration file will download
; all specified modules, themes, and libraries into their respective
; directories. the `drush` command must first be installed to process
; this make file.
;
@delphian
delphian / git-bash-syntax.bash_profile
Created July 7, 2013 04:35
Git bash completion. Copy and paste this into the .bash_profile located in your user directory (~/.bash_profile)
# Git-Completion
#!bash
#
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
@delphian
delphian / uniform-ppcl-program-template-2.0.ppcl
Last active December 19, 2015 05:48
Uniform PPCL Program Template. Using the below template voids the need for goto statements. Also, a software programmer that is unfamiliar with control work will have an easier time examining this style of code. A modular approach to coding is more standard in the software community; though unfortunately virtually unheard of to a controls progra…
00001 C Uniform PPCL Program Template 2.0.
00002 C Using the below template voids the need for goto statements.
00003 C Also, a software programmer that is unfamiliar with control work
00004 C will have an easier time examining this style of code. A modular
00005 C approach to coding is more standard in the software community;
00006 C though unfortunately virtually unheard of to a controls
00007 C programmer. The template begins at line 50.
00008 C
00008 C @see https://gist.github.com/delphian/5906264
00009 C @see https://github.com/delphian/ppcl-library
@delphian
delphian / observer-design-pattern.js
Created June 30, 2013 03:27
Javascript observer design pattern.
/**
* @file
* Observer design pattern.
*
* This object will provide an observer design pattern. Observers may
* subscribe to specific message types. Observables may broadcast
* messages specific to a type.
*
* @author Bryan Hazelbaker <[email protected]>
* @version 1.0