Skip to content

Instantly share code, notes, and snippets.

View NARKOZ's full-sized avatar

Nihad Abbasov NARKOZ

  • Kyiv, Ukraine
View GitHub Profile
@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active August 9, 2022 07:38
Rails 5.2 with webpacker, bootstrap, stimulus starter

Rails 5.2 with webpacker, bootstrap, stimulus starter

This gist will collects all issues we solved with Rails 5.2 and Webpacker

Create Project

# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
@hiroki-uchida
hiroki-uchida / wercker.yml
Created October 21, 2017 13:54
Wercker + Rails + PostgreSQL
box: ruby:2.4.2
services:
- id: postgres:9.6
env:
POSTGRES_PASSWORD: postgres_password
POSTGRES_USER: postgres_user
build:
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
@wagnerjgoncalves
wagnerjgoncalves / introduction.md
Last active August 21, 2023 06:56
Notes from Growing Rails Applications in Practice

Growing Rails Applications in Practice

  • How to use discipline, consistency and code organization to make your code grow more gently.

  • As you cycle through patterns, your application is becoming a patchwork of different coding techniques.

    All those new techniques actually help, or if you are just adding layers of inderection.

  • Large applications are large so what we can do is organize a codebase in a way that "scales logarithmically".

@hashrock
hashrock / vuejs.md
Last active October 5, 2023 23:42
Vue.js資料まとめ(古いので注意)

#まず見るべき

以下のURLは、常に更新されているコンテンツです。

@brianhempel
brianhempel / bench_rails_memory_usage.rb
Last active October 6, 2022 12:47
A script to test the memory usage of your Rails application over time. It will run 30 requests against the specified action and report the final RSS. Choose the URL to hit on line 45 and then run with `ruby bench_rails_memory_usage.rb`.
require "net/http"
def start_server
# Remove the X to enable the parameters for tuning.
# These are the default values as of Ruby 2.2.0.
@child = spawn(<<-EOC.split.join(" "))
XRUBY_GC_HEAP_FREE_SLOTS=4096
XRUBY_GC_HEAP_INIT_SLOTS=10000
XRUBY_GC_HEAP_GROWTH_FACTOR=1.8
XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0
@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@nanase
nanase / Lury.md
Last active March 15, 2018 00:06
Lury 構想まとめ

![Lury][lury] 構想まとめ

※ 項目の名前は適当

※ 実装してみたい全ての機能を記述しているわけではありません

※ サンプルコードは古い構想を含んでいるかもしれません。注意して読んでください

目次

anonymous
anonymous / personwatcher.rb
Created July 28, 2014 21:31
DIY API in Ruby
#!/usr/bin/ruby
require 'rubygems'
require 'net/http'
require 'io/console'
require 'json'
puts "Welcome to the DIY Person Watcher."
puts "Put an empty string as the User's URL to exit."
puts
@tristanfisher
tristanfisher / Ansible-Vault how-to.md
Last active April 3, 2024 13:55
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

Working with ansible-vault


I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.