Skip to content

Instantly share code, notes, and snippets.

Nihad Abbasov NARKOZ

Block or report user

Report or block NARKOZ

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active Nov 7, 2019
Rails 5.2 with webpacker, bootstrap, stimulus starter
View rails_webpacker_bootstrap_expose_jquery.md

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 Oct 21, 2017
Wercker + Rails + PostgreSQL
View wercker.yml
box: ruby:2.4.2
services:
- id: postgres:9.6
env:
POSTGRES_PASSWORD: postgres_password
POSTGRES_USER: postgres_user
build:
View rails_single_file.rb
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 Oct 24, 2019
Notes from Growing Rails Applications in Practice
View introduction.md

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 Nov 3, 2019
Vue.js資料まとめ(古いので注意)
View vuejs.md

#まず見るべき

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

@brianhempel
brianhempel / bench_rails_memory_usage.rb
Last active Oct 22, 2019
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`.
View 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
View trello-css-guide.md

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 Mar 15, 2018
Lury 構想まとめ
View Lury.md

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

※ 項目の名前は適当

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

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

目次

anonymous
anonymous / personwatcher.rb
Created Jul 28, 2014
DIY API in Ruby
View personwatcher.rb
#!/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 Nov 20, 2019
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.
View Ansible-Vault how-to.md

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.

You can’t perform that action at this time.