Skip to content

Instantly share code, notes, and snippets.

View dmitry-ilyashevich's full-sized avatar

Dzmitry Ilyashevich dmitry-ilyashevich

View GitHub Profile
#
# This file is the units database for use with GNU units, a units conversion
# program by Adrian Mariano adrianm@gnu.org
#
# March 2014 Version 2.10
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006
# 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
# Free Software Foundation, Inc
#
CarrierWave.configure do |config|
if Rails.env.development? || Rails.env.test?
config.storage = :file
else
config.storage = :fog
config.fog_credentials = {
:provider => 'OpenStack',
:openstack_auth_url => 'https://auth.selcdn.ru/v1.0',
:openstack_username => Rails.application.secrets.openstack_username,
:openstack_api_key => Rails.application.secrets.openstack_api_key
@dmitry-ilyashevich
dmitry-ilyashevich / SassMeister-input.scss
Created August 4, 2014 12:46
Generated by SassMeister.com.
// ----
// Sass (v3.4.0.rc.1)
// Compass (v1.0.0.alpha.20)
// ----
@mixin context($old-context, $new-contexts...) {
@each $context in $new-contexts {
@at-root #{selector-replace(&, $old-context, $context)} {
@content;
}
@dmitry-ilyashevich
dmitry-ilyashevich / SassMeister-input.scss
Created August 4, 2014 12:46
Generated by SassMeister.com.
// ----
// Sass (v3.4.0.rc.1)
// Compass (v1.0.0.alpha.20)
// ----
/**
* Clamp `$value` between `$min` and `$max`.
*
* @access public
*
@dmitry-ilyashevich
dmitry-ilyashevich / SassMeister-input-HTML.html
Created July 31, 2014 08:27
Generated by SassMeister.com.
<!-- instead of -->
<div class="small-12 large-8 small-centered columns">
1
</div>
<!-- it can be -->
<div class="signup-form">
2
</div>
@dmitry-ilyashevich
dmitry-ilyashevich / SassMeister-input.sass
Created May 30, 2014 07:19
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.7)
// ----
=e($name)
@at-root #{&}__#{$name}
@content
=m($name)
@at-root #{&}--#{$name}
wget -O init-deb.sh http://library.linode.com/assets/1139-init-deb.sh
mv init-deb.sh /etc/init.d/nginx
chmod +x /etc/init.d/nginx
/usr/sbin/update-rc.d -f nginx defaults
@dmitry-ilyashevich
dmitry-ilyashevich / SassMeister-input.scss
Created January 24, 2014 13:28
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
// Counts the number of occurrences of each value of $list
// -------------------------------------------------------------------------------
// @param $list [List] : list
// -------------------------------------------------------------------------------
// @return [Map]
@dmitry-ilyashevich
dmitry-ilyashevich / SassMeister-input-HTML.html
Created January 13, 2014 17:30
Generated by SassMeister.com.
<div></div>
def to_i(w)
r = 0
w.each_char { |ch| r = r | (1 << ch.ord - 96) }
r
end
@dict_word_letters = {}