Skip to content

Instantly share code, notes, and snippets.

View ya-luotao's full-sized avatar
🐢

luotao ya-luotao

🐢
  • Shanghai
  • 01:04 (UTC +08:00)
View GitHub Profile
@ya-luotao
ya-luotao / custom-zk.css
Created May 20, 2022 05:35 — forked from QWxleA/custom-zk.css
Logseq Zettelkasten 💚🐔CSS
/* FLEETING NOTES */
span.page-reference[data-ref="fleeting note"]
{ background: var(--ls-primary-background-color);
background-size: 100%;
color: var(--ls-primary-text-color);
padding: 2px 5px 2px 5px;
font-size: 13px;
line-height: 1em;
font-weight: 500;
@ya-luotao
ya-luotao / Rakefile
Created January 10, 2017 11:04 — forked from schickling/Rakefile
Activerecord without Rails
require "active_record"
namespace :db do
db_config = YAML::load(File.open('config/database.yml'))
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'})
desc "Create the database"
task :create do
ActiveRecord::Base.establish_connection(db_config_admin)
@ya-luotao
ya-luotao / deploy.rb
Created October 23, 2015 04:24 — forked from jamesmoriarty/deploy.rb
Sidekiq, Upstart, and Capistrano
namespace :deploy do
namespace :sidekiq do
desc 'Replace upstart config for sidekiq-workers'
task :upstart_config do
data = %Q{
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec su - #{user} -c 'cd #{release_path}; export RAILS_ENV=#{stage}; bundle exec sidekiq -q default,1 -c 4 -pid #{release_path}/tmp/pids/sidekiq.pid >> #{release_path}/log/sidekiq.log 2>&1'