Skip to content

Instantly share code, notes, and snippets.

View stemount's full-sized avatar
📺
As seen on TV

Stephen Mount stemount

📺
As seen on TV
View GitHub Profile
#!/bin/bash
# Download Drush v3 from D.O and make it work on `drush` (OS X / Linux / *nix)
# Written by stemount, adapted by KarenS
# Last updated by Drupalise IT (http://drupalise.it) on 13 Sep 2010
# Update user
echo "Drush is now downloading via HTTP"
# move to home dir
Current User Status Module
Create a Drupal module in either Drupal 6 or 7 to fulfil the following criteria.
1. We wish to display a simple status on a User's profile page. For example "John Appleseed is currently [STATUS]" or "John Appleseed is currently not [STATUS]". [STATUS] could be replaced by something like "in the office" or "listening to music". This setting should be an on/off toggle switch.
2. The status will need to be a configurable value from its own settings page. Once the status value is set for the site, it should not need to be changed. This could take the form of a drop down menu or radio buttons with pre-configured values or a text box with one value.
3. There should be access restrictions in place to control who is allowed to change this setting.
4. The User Profile page also needs a restriction in place to who can alter the user's status.
5. The complete history of a user's status should be stored in its own database table along with a time reference.
6. A block should be available to
@stemount
stemount / Default (OSX).sublime-keymap
Created July 26, 2013 16:33
Drupal Sublime Text 2 Settings
{ "keys": ["ctrl+shift+t"], "command": "delete_trailing_spaces" }
@stemount
stemount / SassMeister-input-HTML.html
Created March 12, 2014 21:55
Generated by SassMeister.com.
<div class="hello">
</div>
@stemount
stemount / Drupal Brightcove Token
Created October 7, 2014 09:37
Drupal Brightcove Token Example
[[brightcove:3811542772001]]
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
#PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
PROMPT='%{$fg_bold[white]%}%M %{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
#PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
PROMPT='%{$fg_bold[white]%}$SHORT_HOST %{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"

Keybase proof

I hereby claim:

  • I am stemount on github.
  • I am stemount (https://keybase.io/stemount) on keybase.
  • I have a public key ASBEecWoqkYW5TEvs3_Ie_PXGAgD9Rt7iduyGl6yGPJM6Qo

To claim this, I am signing this object:

@stemount
stemount / Ubuntu-Compass-ruby[16.04]
Created April 21, 2018 16:21 — forked from AungMyoKyaw/Ubuntu-Compass-ruby[16.04]
Compass installation for ubuntu 16.04
[https://gist.github.com/stephou0104/233b5c99884f1d8c8b8b#file-ubuntu-compass-ruby]
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
vagrant@noagent-homestead:~/Code/admin$ php artisan finance:gocardless:sync
Syncing with Go Cardless
time: 3.3026220798492 seconds
amount of records: 425
32 Oakfield Avenue (subscription SB00034SV8G7CJ)
[FAILED] Meta ref R-36D6 and Payment ref R-36D6 not valid.
South cave, 31 Pinfold (subscription SB00034SPH8CZ8)
[FAILED] Meta ref R-35GA and Payment ref R-35GA not valid.