Skip to content

Instantly share code, notes, and snippets.

View vovs03's full-sized avatar
💭
λ Functional Pro | Haskell

Vλadimir Pavλychev vovs03

💭
λ Functional Pro | Haskell
View GitHub Profile
@gambala
gambala / application_helper.rb
Last active August 1, 2017 16:27
http://images inside https://site with proxying in nginx
module ApplicationHelper
def http_url(url)
return url if Rails.env.development?
"/http_proxy?url=#{url}"
end
end
@fedorkk
fedorkk / sublime_plugins.txt
Last active February 2, 2018 09:24
My list of plugins for Sublime3
"AdvancedNewFile",
"Alignment",
"All Autocomplete",
"BracketHighlighter",
"CJSX Syntax",
"Colorsublime",
"ESLint",
"FileDiffs",
"Gist",
"GitSavvy",
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure('2') do |config|
config.vm.box = 'ubuntu/trusty64'
config.vm.hostname = 'rails-dev-box'
config.ssh.username = "vagrant"
config.ssh.password = "vagrant"
# Логирование
Это есть первая задача, которой я занялся, делая этот сервер.
Причина? Просто я солидарен с этим мнением:
> Я твердо уверен, что внедрить логирование в уже готовую программу без изменения архитектуры приложения – невозможно .
> Точнее внедрить можно, но тогда лог будет настолько страшным и неудобочитаемым, что остается посочувствовать
> тем администраторам, которые будут с ним работать.[1]
@tomshen
tomshen / youtube-download.md
Created May 25, 2017 13:00
How to Download a YouTube Video in MP4 with Subtitles

How to Download a YouTube Video in MP4 with Subtitles

Install youtube-dl:

brew install youtube-dl
pip install youtube-dl

and run the following:

Your views:
=== show.html.erb ===
<% content_for :header do
stylesheet_link_tag 'blabla'
end %>
<% content_for :header do
javascript_include_tag 'blabla'
end %>
<div>
@ro31337
ro31337 / awesome_pry.md
Last active March 11, 2021 21:54
Pry for Rails setup

How to make awesome pry for Rails

Tested on Rails 5.1, for development, test and production (!).

At the top of your Gemfile (don't add to :development or :test):

  • Add gem 'pry' to your Gemfile
  • Add gem 'awesome_print' to your Gemfile

Make sure you updated your application.rb (not development.rb):

@jodosha
jodosha / README.md
Created September 7, 2017 14:34
Mount Hanami inside Rails

1. Setup

rails new blog
cd blog
hanami new bookshelf
vim Gemfile # add `hanami`
bundle
vim bookshelf/config/environment.rb # See Note 1

Ruby Association Certified Ruby Examination Silver Sample Questions

Q1. Which of the following have true values in Ruby? (Choose two.)

  • (a) ""
  • (b) 0
  • (c) false
  • (d) nil