This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bananajourd() { | |
| local check=`screen -list|grep bananajour|awk '{print $1}'` | |
| if [[ "$1" = "" ]]; then | |
| if [[ "${check}" = "" ]]; then | |
| screen -dmS bananajour bananajour | |
| echo "Started bananajour in background" | |
| else | |
| echo "Bananajour is running in background..." | |
| read -p "re-attach? (y/n)" choice | |
| if [[ $choice = [yY] ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Shortlist | |
| def initialize(variants) | |
| @list_storage = variants | |
| if @list_storage.nil? | |
| @list_storage = [] | |
| end | |
| end | |
| def add_variant(variant_id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # __selector: "prompt", "returnvar", "current_selected", "selection_list" | |
| # | |
| # __selector "Select a volume", "selected_volume", "", `ls -la /Volumes/` | |
| # cd $selected_volume | |
| # | |
| function __selector() { | |
| local selections selPrompt selCurrent selListCommand selSize choose | |
| selPrompt=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| begin | |
| require('KeithPitt') | |
| rescue PersonNotAvailableException | |
| logger.error('Keith Pitt is currently unavailable') | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # __screend: screen daemonizing | |
| __screend() { | |
| local name="${1}" | |
| local check=`screen -list|grep $name|awk '{print $1}'` | |
| if [[ "$2" = "" ]]; then | |
| if [[ "${check}" = "" ]]; then | |
| screen -dmS $name $name > /dev/null | |
| local runCheck=`screen -list|grep $name|awk '{print $1}'` | |
| if [[ "${runCheck}" = "" ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var object = { | |
| init: function() { | |
| this.someFunc(); | |
| }, | |
| someFunc: function() { | |
| console.log('Stuff'); | |
| }, // THIS TRAILING COMMA SUX ARSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('a.link').unbind( 'click' ); | |
| $('a.link').bind( 'click', function(event) { | |
| event.preventDefault(); | |
| event.stopPropagation(); | |
| var f = this.className.replace(/(\s|^)link(\s|$)/, ""); | |
| this.mediaType = f.substr(0, 1).toUpperCase() + f.substr(1); | |
| if (this.mediaType == "Artist") { | |
| this.linkText = $(this).prevAll("h5").text() + " (Artist)"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| #Usage | |
| # | |
| #$ __selector "Select a volume" "selected_volume" "" "`ls -la /Volumes/`" | |
| #$ cd $selected_volume | |
| # | |
| # __selector: good for selecting stuff | |
| function __selector() { | |
| local selections selPrompt selCurrent selListCommand selSize choose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Driver | |
| .... | |
| after_destroy :set_new_current_driver_to_insurance_detail | |
| protected | |
| def set_new_current_driver_to_insurance_detail | |
| @insurance_detail = self.insurance_detail | |
| @insurance_detail.update_attribute(:current_driver, @insurance_detail.drivers.first) if @insurance_detail.drivers.any? and @insurance_detail.current_driver_id == self.id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Apathy | |
| extend ActiveSupport::Concern | |
| def care_factor | |
| 0 | |
| end | |
| end | |
| class Dan |
OlderNewer