Skip to content

Instantly share code, notes, and snippets.

View tanelsuurhans's full-sized avatar

Tanel Suurhans tanelsuurhans

  • ID.me
  • United States
View GitHub Profile
### 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:
<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"/>
# option one
case variable
when "value1"
do_stuff
when "value2"
do_stuff
else
do_stuff
end
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":
@tanelsuurhans
tanelsuurhans / sieve.rb
Last active August 29, 2015 13:55 — forked from anonymous/sieve.rb
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
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\] "
#!/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
#!/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
<?php
class Enterprise_CustomerSegment_Model_Observer
{
public function addSegmentsToSalesRuleCombine(Varien_Event_Observer $observer)
{
if (!Mage::helper('enterprise_customersegment')->isEnabled()) {
return;
}
class Meal
has_many :recipes
has_many :ingredients, through: :recipes
end
class Recipe
belongs_to :meal