Skip to content

Instantly share code, notes, and snippets.

View sadfuzzy's full-sized avatar
🎯
Focusing

Denis Savitskiy sadfuzzy

🎯
Focusing
View GitHub Profile
@davydovanton
davydovanton / dry_monads_with_handler.rb
Last active February 20, 2019 13:06
dry_monads_with_handler
def result_handler(result)
case result
when Success, Some
puts 'success, user created'
when Failure { |message, _| message == :http_error }
puts "HTTP request error, #{result.failure[2]}"
when Failure { |message, _| message == :validation_error }
puts "validation error, #{result.failure[2]}"
when Failure(ROM::Error)
puts 'User not created'
@eikes
eikes / gist:5a64b661022c756bd6522ed94770e2a6
Created July 4, 2016 14:02
List of Ruby on Rails Timezone names and their alias
["Africa/Algiers", "West Central Africa"],
["Africa/Cairo", "Cairo"],
["Africa/Casablanca", "Casablanca"],
["Africa/Harare", "Harare"],
["Africa/Johannesburg", "Pretoria"],
["Africa/Monrovia", "Monrovia"],
["Africa/Nairobi", "Nairobi"],
["America/Argentina/Buenos_Aires", "Buenos Aires"],
["America/Bogota", "Bogota"],
["America/Caracas", "Caracas"],
@KELiON
KELiON / alfred.md
Last active December 20, 2015 12:24
Tools

Первое, без чего я уже не могу работать — alfred. Кроме запуска программ я в нем ищу файлы/папки, т.к. finder тупой: Постоянно использую clipboard history:

В сниппетах у меня сохранены какие-то линуксовые команды, которые я никак не могу запомнить, смайлы (╯°□°)╯︵ ┻━┻ и ¯_(ツ)_/¯ (не запоминать же их)

Из плагинов постоянно использую:

@sadfuzzy
sadfuzzy / setup.txt
Last active June 1, 2024 16:30
Ubuntu setup
System:
sudo apt-get install software-properties-common ncdu
Git:
sudo apt-get install git git-core
git config --global user.email "sadfuzzy@yandex.ru"
git config --global user.name "Denis Savitskiy"
git config --global push.default simple
https://github.com/settings/ssh
@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
@dklisiaris
dklisiaris / rails-boilerplate.md
Last active August 18, 2017 05:58
A manual setup for a typical rails 4.x. app with bootstrap layout, devise authentication, rspec testing framework with capybara and git version control.

Setup a new project and database.

Create a new rails app named app_name without Test::Unit and with mysql database:

rails new app_name -T -d mysql

or an app without Test::Unit and with postgresql database:

rails new app_name -T -d postgresql

or without Test::Unit and with the default sqlite:

**Младший специалист**
* Оклад:25000 (без опыта работы, мало опыта)
* Не может находиться на этой позиции , более чем три месяца (3 мес испытательный срок)
Обязанности:
-Рассмотрение заявок на предоставление займа
-Телефонная верификация
-Анализ платежеспособности клиента
**Специалист**
@veelenga
veelenga / currency.sh
Last active July 5, 2016 09:45
i3blocks script gist for displaying current currency ratio from Google's finance convertor
#!/bin/sh
# Copyright (C) 2014 Vitaliy Elengaupt <velenhaupt@gmail.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# lib/capistrano/tasks/assets.rake
Rake::Task['deploy:assets:precompile'].clear
namespace :deploy do
namespace :assets do
desc 'Precompile assets locally and then rsync to remote servers'
task :precompile do
local_manifest_path = %x{ls public/assets/manifest*}.strip
@chrisb
chrisb / gist:4d6a09c6cc1ca2e1b14e
Last active November 25, 2022 04:15
Homebrew, Ruby, and Rails on OS X 10.10

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at: https://developer.apple.com

2. Install the Command Line Tools (CLT)