Skip to content

Instantly share code, notes, and snippets.

View cinic's full-sized avatar

Alexandr Andreev cinic

View GitHub Profile
@cinic
cinic / dabblet.css
Created June 13, 2012 11:54
Opera iFrame bug
/**
* Opera iFrame bug
*/
body {
background:#FFF;
}
iframe {
border:1px solid #000;
border-radius:10px;
@cinic
cinic / dabblet.css
Created June 13, 2012 12:51
Opera iFrame bug
/**
* Opera iFrame bug
*/
body {
background:#FFF;
}
iframe {
border:1px solid #000;
/*border-radius:10px;*/
@cinic
cinic / wishlist.md
Created August 14, 2012 12:40 — forked from pepelsbey/wishlist.md
Бписок ТСланий

Бписок ТСланий

ВСдётся для Π΄Ρ€ΡƒΠ·Π΅ΠΉ (Ρ‡Ρ‚ΠΎ Ρ‚Π΅Π±Π΅ ΠΏΠΎΠ΄Π°Ρ€ΠΈΡ‚ΡŒ?) ΠΈ для сСбя (ΠΊΡƒΠ΄Π° Π±Ρ‹ ΠΏΠΎΡ‚Ρ€Π°Ρ‚ΠΈΡ‚ΡŒ дСньги?). Если Π²Ρ‹ Ρ…ΠΎΡ‚ΠΈΡ‚Π΅ мСня ΠΏΠΎΡ€Π°Π΄ΠΎΠ²Π°Ρ‚ΡŒ, Ρ‚ΠΎ ΠΌΠΎΠΆΠ΅Ρ‚Π΅ ΠΊΡƒΠΏΠΈΡ‚ΡŒ Ρ‡Ρ‚ΠΎ-Π½ΠΈΠ±ΡƒΠ΄ΡŒ ΠΈΠ· списка Π½ΠΈΠΆΠ΅ ΠΈΠ»ΠΈ просто пСрСвСсти ΠΌΠ½Π΅ Π΄Π΅Π½Π΅Π³ Π² качСствС ΠΊΠΎΠΌΠΏΠ»ΠΈΠΌΠ΅Π½Ρ‚Π°. ΠŸΠ΅Ρ€Π΅Π΄ Ρ‚Π΅ΠΌ, ΠΊΠ°ΠΊ Ρ‡Ρ‚ΠΎ-Π»ΠΈΠ±ΠΎ ΠΊΡƒΠΏΠΈΡ‚ΡŒ, сообщитС ΠΌΠ½Π΅ ΠΎ своём Π½Π°ΠΌΠ΅Ρ€Π΅Π½ΠΈΠΈ, Ρ‡Ρ‚ΠΎΠ±Ρ‹ Π½Π΅ Π±Ρ‹Π»ΠΎ пСрСсСчСний Π² сСзонныС ΠΏΠΎΠ΄Π°Ρ€ΠΎΡ‡Π½Ρ‹Π΅ ΠΏΠ΅Ρ€ΠΈΠΎΠ΄Ρ‹. Π˜ΡΠΊΠ»ΡŽΡ‡Π΅Π½ΠΈΠ΅ составляСт Ρ‚ΠΎΠ»ΡŒΠΊΠΎ список Β«ΠŸΡ€ΠΎΡ‡Π΅Π΅Β».

Книги

#Save this file as hax_background_jobs_in_unicorn.ru
#In one terminal run: unicorn hax_background_jobs_in_unicorn.ru
#In another run: curl -v localhost:8080
class CleverMailSender
class << self; attr_accessor :emails_to_send; end
self.emails_to_send = []
class BodyProxy
def initialize(body)
@body = body
@cinic
cinic / capybara.md
Last active August 29, 2015 14:23 — forked from steveclarke/capybara.md

Capybara

save_and_open_page

Matchers

have_button(locator)
@cinic
cinic / gist:6a1d2af82ebdf4ae7ac1
Last active September 15, 2015 11:22 — forked from alimd/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | πŸ˜„ | πŸ˜† | 😊 | πŸ˜ƒ | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | πŸ˜† | 😁 | πŸ˜‰ | :wink2: | πŸ‘… | πŸ˜’ | πŸ˜… | πŸ˜“

😩 | πŸ˜” | 😞 | πŸ˜– | 😨 | 😰 | 😣 | 😒 | 😭 | πŸ˜‚ | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😑 | 😀 | πŸ˜ͺ | πŸ˜‹ | 😷

😎 | 😡 | πŸ‘Ώ | 😈 | 😐 | 😢 | πŸ˜‡ | πŸ‘½ | πŸ’› | πŸ’™ | πŸ’œ | ❀️ | πŸ’š | πŸ’” | πŸ’“ | πŸ’— | πŸ’• | πŸ’ž | πŸ’˜ | ✨

@cinic
cinic / support_cyrillic.sh
Created November 17, 2015 20:49 — forked from vladimir-e/support_cyrillic.sh
Support cyrillic / russian input in rails console and IRB
$ brew install openssl readline
$ CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline`" rbenv install 2.0.0-p353
@cinic
cinic / .gitignore
Created January 20, 2016 01:10 — forked from WattsInABox/.gitignore
Generate Static HTML Website Using Ruby on Rails
# Ignore static version of the site (used to upload error pages to S3 for Heroku errors)
/out
@cinic
cinic / deploy.rb
Created January 20, 2016 15:43 — forked from chuckbjones/deploy.rb
Generate static html files at deploy time in Rails 3.x
# define a method to run rake tasks
def run_rake(task, options={}, &block)
rake = fetch(:rake, 'rake')
rails_env = fetch(:rails_env, 'production')
command = "cd #{current_path} && #{rake} #{task} RAILS_ENV=#{rails_env}"
run(command, options, &block)
end
@cinic
cinic / README.md
Created March 14, 2016 22:05 — forked from jhilden/README.md
Setup for using i18n-js together with react-rails i18n-js for server side prerendering

When using react-rails for an internationalized app it makes a lot of sense to use i18n-js for translations, so that you can reuse the the strings from your rails app's .yml files (and all the tooling & services that exist around that).

When you use the prerender feature of react-rails you face 2 problems:

  • The first is that translation.js & i18n.js from i18n-js need to be loaded inside the server-side JS prerendering processes, which is achieved by loading them inside the components.js.
  • The second problem is the server processes need to be aware of the current locale of each HTTP request. This is done by adding a custom renderer and using the before_render hook to configure i18n-js accordingly for each render call.