Skip to content

Instantly share code, notes, and snippets.

View yurijmi's full-sized avatar

Stack The Fennec yurijmi

  • Loner with an impostor syndrome, so nowhere. Looking forward to be hired i guess
  • Georgia
  • 08:39 (UTC +04:00)
View GitHub Profile
@k1r8r0wn
k1r8r0wn / devise.ru.yml
Last active May 12, 2023 18:47
Russian i18n locale for `Devise` gem
# Русский перевод для https://github.com/plataformatec/devise/tree/v4.7.1
# Другие переводы на https://github.com/plataformatec/devise/wiki/I18n
ru:
devise:
confirmations:
confirmed: "Ваша учётная запись успешно подтверждена."
send_instructions: "В течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи."
send_paranoid_instructions: "Если ваш адрес email есть в нашей базе данных, то в течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи."
failure:
@subfuzion
subfuzion / curl.md
Last active April 26, 2024 09:43
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@alxfv
alxfv / ice_cube.ru.yml
Created December 25, 2015 08:20
Russian locale for ice_cube
ru:
ice_cube:
pieces_connector: ' / '
not: 'not %{target}'
not_on: 'not on %{target}'
date:
formats:
default: '%B %-d, %Y'
month_names:
-
@kryzhovnik
kryzhovnik / routes.rb
Created May 22, 2015 15:34
Интеграция Яндекс.Кассы с Rails
# config/routes.rb
YandexKassaIntegration::Application.routes.draw do
# ...
scope '/yandex_kassa' do
controller 'yandex_kassa', constraints: { subdomain: 'ssl' } do
post :check
post :aviso
get :success
get :fail
@Joseph-N
Joseph-N / _message.html.erb
Last active April 15, 2021 11:09
Tutorial code snippets for chat application in rails. Tutorial link http://goo.gl/l3e8zN
<li class="<%= self_or_other(message) %>">
<div class="avatar">
<img src="http://placehold.it/50x50" />
</div>
<div class="chatboxmessagecontent">
<p><%= message.body %></p>
<time datetime="<%= message.created_at %>" title="<%= message.created_at.strftime("%d %b %Y at %I:%M%p") %>">
<%= message_interlocutor(message).name %> • <%= message.created_at.strftime("%H:%M %p") %>
</time>
</div>
@vertexclique
vertexclique / cracking.md
Last active April 8, 2024 18:24
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@stevenyap
stevenyap / Capistrano 3.md
Created February 21, 2014 08:52
Capistrano 3 Setup

This guide explains the way to setup a production server using Capistrano.

Setup Capistrano on LOCAL

  • Capistrano is a development gem which assist the developer to run commands on the production server (something like a Heroku toolbelt)
  • Hence, it is installed and configured on developer's computer
# Gemfile

# Use Capistrano for deployment
@fmariluis
fmariluis / new_gist_file
Created June 18, 2013 14:49
Create unique id field for a view in PostgreSQL
SELECT * FROM
( SELECT
ROW_NUMBER() OVER (ORDER BY column_to_sort_by ASC) AS ROW_NUMBER,
Col1, Col2
FROM table_name
) myview_name
@jhjguxin
jhjguxin / user_observer.rb
Created June 3, 2013 06:16
cache devise's current_user method, speed up page's load, used for guanxi_cms, Suitable for devise 2.x - 3.x, Rails 3.x
class UserObserver < Mongoid::Observer
def after_save(record)
expire_cache(record)
end
private
def expire_cache(record)
Rails.cache.delete("user:#{record.id}")
end
@joshwand
joshwand / tumblr-likes-downloader.rb
Last active May 6, 2019 11:23
download your liked photos from tumblr
require 'tumblr_client'
require 'mechanize'
require 'date'
require 'yaml'
require 'uri'
Tumblr.configure do |config|
config.consumer_key = "consumer_key"
config.consumer_secret = "consumer_secret"
config.oauth_token = "oath_token"