Skip to content

Instantly share code, notes, and snippets.

@kimsuelim
kimsuelim / audit_log.md
Last active September 18, 2018 01:21
Rails 앱에 audit log 활성화하기

Rails 앱에 audit log 활성화하기

서비스를 운영할 때 admin tool은 필수입니다. 운영진은 사용자의 개인정보에 접근하거나 사용자의 요청에 따른 수정, 환불과 같은 이슈를 해결해야 합니다. 개발자에게 요청하여 수동으로 처리하는 경우가 많은가요? 개발자의 시간과 집중력은 소중하기에 수동으로 처리해야 하는 일은 최소로 줄여야 합니다.

그렇다면 운영진이 중요한 정보에 접근하거나 수정하는 것을 어떻게 기록할까요? 이럴 경우 저는 쉽고 빠르게 적용 가능한 audit log를 사용합니다. audit log에 기록하는 내용:

  • 접근한 페이지의 controller와 params
@willurd
willurd / web-servers.md
Last active May 21, 2024 09:23
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ChristianPeters
ChristianPeters / config-application.rb
Created April 16, 2012 12:29
Adapted for Rails Asset Pipeline: Split CSS files so that there are no more than a given number of selectors in one style sheet. This is a tool to cope with Internet Explorer's limitation of max. 4095 selectors per stylesheet.
#...
module MyProject
class Application < Rails::Application
config.assets.precompile += %w( ie6.css ie6_portion2.css ie7.css ie7_portion2.css ie8.css ie8_portion2.css ie9.css ie9_portion2.css)
#...
@tmeasday
tmeasday / css_splitter.rb
Created January 7, 2012 02:20
A modified CSS splitter that allows you to extract a single part.
# copied from https://gist.github.com/1131536, thanks christian peters.
module CssSplitter
def self.split(infile, outdir = File.dirname(infile), max_selectors = 4095)
charset_statement, rules = self.read_rules(infile)
return if rules.nil?
self.partition_rules(rules, max_selectors).each_with_index do |ruleset, index|
next if index == 0 # no need to write out the first file