Skip to content

Instantly share code, notes, and snippets.

View smeevil's full-sized avatar
🥰
Hugs for all!

Gerard de Brieder smeevil

🥰
Hugs for all!
  • Govannon
  • Netherlands
View GitHub Profile
### Keybase proof
I hereby claim:
* I am smeevil on github.
* I am smeevil (https://keybase.io/smeevil) on keybase.
* I have a public key whose fingerprint is 7873 DAFA 55BF 1BA5 C258 229D 1FD5 EFA3 4596 87B5
To claim this, I am signing this object:
@smeevil
smeevil / notify_flowdock
Created July 24, 2013 11:07
Just add this as last line to your Deploy commands on semaphore app. A simple notification to the deployer that semaphore app's deploy is done. Just replace <API_KEY> with the api key of your flow dock channel. If your first name of the commit is the same as your name in flow dock, you will get a notification beep :)
NAME=`git --no-pager show -s --format='%cn' $REVISION|sed -e 's/ .*//'` && curl -X POST --data "{\"content\": \"Deploy by @$NAME is done #deploy\", \"external_user_name\": \"Semaphore\", \"tags\": [\"deploy\"]}" https://api.flowdock.com/v1/messages/<API_KEY> --header "Content-Type:application/json"
@smeevil
smeevil / gist:2875769
Created June 5, 2012 15:37
Cookie control translation
//Add this after your cookie control script
function TranslateCookieControl(){
var cookieControlTitle="Cookie Acceptatie";
var cookieControlOkButton="Ik ga hiermee akkoord !";
var cookieControlMoreInfoButton="Meer info"
var cookieControlLessInfoButton="Minder info"
$('p.ccc-about').remove();
$('#ccc-go').html(cookieControlOkButton);
$('.ccc-inner').children().first().html(cookieControlTitle);
@smeevil
smeevil / allow_single_access.rb
Created February 8, 2010 13:56
authlogic single_access_allowed config
# Allows you to define "allow_single_access" in multiple ways :
#
# single_access_allowed #all methods are accessable
# single_access_allowed :only=>:index
# single_access_allowed :only=>[:index, :show]
# single_access_allowed :except=>[:edit]
# single_access_allowed :except=>[:edit, :delete]
#
### example
#!/usr/bin/ruby
@exec="red5.sh"
@name="Red 5"
@match="/var/red5/boot.jar"
@kill_sig="-9"
@sleep=5
@pidfile=File.expand_path(File.join(File.dirname(__FILE__), "pid", "#{@exec}.pid"))
@path=File.expand_path(File.join(File.dirname(__FILE__)))