This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am tanelsuurhans on github. | |
* I am tanelsuurhans (https://keybase.io/tanelsuurhans) on keybase. | |
* I have a public key ASADXi-GUN4HxSQCMt4WAkpt5G0SNQ07i5EqK4c1FuPMrwo | |
To claim this, I am signing this object: |
This file contains 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
<element name="KeyInfo" type="ds:KeyInfoType"/> | |
<complexType name="KeyInfoType" mixed="true"> | |
<choice maxOccurs="unbounded"> | |
<element ref="ds:KeyName"/> | |
<element ref="ds:KeyValue"/> | |
<element ref="ds:RetrievalMethod"/> | |
<element ref="ds:X509Data"/> | |
<element ref="ds:PGPData"/> | |
<element ref="ds:SPKIData"/> | |
<element ref="ds:MgmtData"/> |
This file contains 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
# option one | |
case variable | |
when "value1" | |
do_stuff | |
when "value2" | |
do_stuff | |
else | |
do_stuff | |
end |
This file contains 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
Bundler could not find compatible versions for gem "sprockets": | |
In Gemfile: | |
sass-rails (>= 0) ruby depends on | |
sprockets (~> 2.0.0) ruby | |
rails (= 4.1) ruby depends on | |
sprockets-rails (~> 2.0) ruby depends on | |
sprockets (2.12.1) | |
Bundler could not find compatible versions for gem "sprockets-rails": |
This file contains 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
def can_delete?(object) | |
can_delete_by_core_role?(object) || | |
can_delete_by_owner?(object) || | |
can_delete_by_zone_role?(object) || | |
can_delete_by_access_profile?(object) | |
end |
This file contains 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
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
[[ -s "/Users/tanel/.rvm/scripts/rvm" ]] && source "/Users/tanel/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
[[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion # for RVM completion | |
if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then source `brew --prefix`/etc/bash_completion.d/git-completion.bash; fi # for Git completion | |
export PS1="\[\033[01;34m\]\$(~/.rvm/bin/rvm-prompt) \[\033[01;32m\]\w\[\033[00;33m\]\$(__git_ps1 \" (%s)\") \[\033[01;36m\]\$\[\033[00m\] " |
This file contains 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
#!/bin/bash | |
# Output lines suitable for sysctl configuration based | |
# on total amount of RAM on the system. The output | |
# will allow up to 50% of physical memory to be allocated | |
# into shared memory. | |
# On Linux, you can use it as follows (as root): | |
# | |
# ./shmsetup >> /etc/sysctl.conf |
This file contains 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
#!/usr/bin/env ruby | |
#------------------------------------------------------------------------------ | |
# Aggregate Print useful information from /proc/[pid]/smaps | |
# | |
# pss - Roughly the amount of memory that is "really" being used by the pid | |
# swap - Amount of swap this process is currently using | |
# | |
# Reference: | |
# http://www.mjmwired.net/kernel/Documentation/filesystems/proc.txt#361 |
This file contains 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
<?php | |
class Enterprise_CustomerSegment_Model_Observer | |
{ | |
public function addSegmentsToSalesRuleCombine(Varien_Event_Observer $observer) | |
{ | |
if (!Mage::helper('enterprise_customersegment')->isEnabled()) { | |
return; | |
} |
This file contains 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 Meal | |
has_many :recipes | |
has_many :ingredients, through: :recipes | |
end | |
class Recipe | |
belongs_to :meal |
NewerOlder