Skip to content

Instantly share code, notes, and snippets.

View nowa's full-sized avatar

Nowa Zhu nowa

View GitHub Profile
@bdarcus
bdarcus / academic.el
Created November 29, 2021 01:13 — forked from rka97/academic.el
Configuration I use in Doom Emacs as part of my academic reading/notetaking workflow
;; The following packages are needed:
;; 1. elfeed and elfeed-score (available from the rss doom module)
;; 2. citar
;; 3. org-ref
;; 4. org-roam and org-roam-bibtex
(defconst robo/bib-libraries (list "~/bib-lib/robo-lib.bib" "~/bib-lib/robo-temp-lib.bib")) ; All of my bib databases.
(defconst robo/main-bib-library (nth 0 robo/bib-libraries)) ; The main db is always the first
(defconst robo/main-pdfs-library-paths `("~/bib-lib/pdfs/" "/home/robo/bib-lib/temp-pdfs/")) ; PDFs directories in a list
@we11adam
we11adam / update_cert_hook.sh
Last active February 11, 2019 03:30
update_cert_hook
#!/bin/bash
# @author: http://github.com/welladamm/
CERT_NAME="you_domain.com"
LOCAL_DIR=$(cd $(dirname $0); pwd -P)
LOCAL_CERT_DIR="$LE_WORKING_DIR/$CERT_NAME"
SSH="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q"
SCP="scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q"
@dahlia
dahlia / lisp.rb
Created September 2, 2010 07:52
30 minutes Lisp in Ruby
# 30 minutes Lisp in Ruby
# Hong Minhee <http://dahlia.kr/>
#
# This Lisp implementation does not provide a s-expression reader.
# Instead, it uses Ruby syntax like following code:
#
# [:def, :factorial,
# [:lambda, [:n],
# [:if, [:"=", :n, 1],
# 1,
# This will ride alongside god and kill any rogue memory-greedy
# processes. Their sacrifice is for the greater good.
unicorn_worker_memory_limit = 300_000
Thread.new do
loop do
begin
# unicorn workers
#
# http://unicorn.bogomips.org/SIGNALS.html
rails_env = ENV['RAILS_ENV'] || 'production'
rails_root = ENV['RAILS_ROOT'] || "/data/github/current"
God.watch do |w|
w.name = "unicorn"
w.interval = 30.seconds # default
# unicorn needs to be run from the rails root