Skip to content

Instantly share code, notes, and snippets.

Avatar

jhjguxin jhjguxin

View GitHub Profile
@yahonda
yahonda / ruby31onrails.md
Last active Jul 26, 2022
Ruby 3.1 on Rails
View ruby31onrails.md

Ruby 3.1 on Rails

Actions required to use Ruby 3.1.0 with Rails

Rails 7.0.Z

  • Rails 7.0.1 is compatible with Ruby 3.1.0.
  • Rails 7.0.1 addes net-smtp, net-imap and net-pop gems as Action Mailbox and Action Mailer dependency, you do not need to add them explicitly in your application Gemfile anymore.
  • thor 1.2.1 has been released. You will not see DidYouMean::SPELL_CHECKERS.merge deprecate warnings anymore.

Rails 6.1.Z

  • Use Rails 6.1.5 to support database.yml with aliases and secrets.yml with aliases.
View graphql-vs-firebase.md

GraphQL vs Firebase

With the variety of server-side technologies today, developers have a lot of choices when it comes to deciding what kind of backend to use for their next application.

In this article, we want to explore the differences between GraphQL and Firebase, two very popular server-side technologies.

Overview

Before diving into technical details, let's create some perspective on the two technologies and where they're coming from.

@donnierayjones
donnierayjones / LICENSE
Last active Mar 9, 2022
Render Bootstrap as "small" layout when printing
View LICENSE
Copyright (C) 2016 Donnie Ray Jones
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@ak47
ak47 / unicorn.rb
Created Apr 3, 2014
force figaro ENV vars to reload on unicorn USR2 restarts
View unicorn.rb
root = "/var/www/cake/current"
working_directory root
pid "#{root}/tmp/pids/unicorn.pid"
stderr_path "#{root}/log/unicorn.stderr.log"
stdout_path "#{root}/log/unicorn.log"
listen "/tmp/unicorn.cake.sock"
worker_processes 2
timeout 15
@jhjguxin
jhjguxin / changelog.markdown
Last active Dec 14, 2015
tips from guanxi.me
View changelog.markdown

guanxi app 's changelog from francis

date: 2013-4-3

feature

  • commend#index 支持基于 sql 的无限翻页
  • 重新定义智能推荐逻辑
  • 定义活跃度算法
  • 定义了定时任务用于更新智能推荐和活跃用户
@jhjguxin
jhjguxin / Resume.markdown
Last active Dec 13, 2015
jhjguxin's resume
View Resume.markdown
@jhjguxin
jhjguxin / bundle.markdown
Last active Oct 6, 2015
tips from francis
View bundle.markdown

which bundle

bundler

Broken bundle install details (1.1rc)

Cleanup then broken commands:

$ rm -rf ~/.bundle/ ~/.gem/                                                
@mikhailov
mikhailov / 0. nginx_setup.sh
Last active Feb 25, 2022
NGINX+SPDY with Unicorn. True Zero-Downtime unless migrations. Best practices.
View 0. nginx_setup.sh
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed.
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies.
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module
#
# Deployment structure
#
# SERVER:
# /etc/init.d/nginx (1. nginx)
# /home/app/public_html/app_production/current (Capistrano directory)
#
@eerohele
eerohele / ringbuffer.rb
Last active Oct 29, 2018
A simple ring buffer for Ruby.
View ringbuffer.rb
class RingBuffer < Array
attr_reader :max_size
def initialize(max_size, enum = nil)
@max_size = max_size
enum.each { |e| self << e } if enum
end
def <<(el)
if self.size < @max_size || @max_size.nil?