Skip to content

Instantly share code, notes, and snippets.

View wuliwong's full-sized avatar
🎷
cold slammin

Patrick Bradley wuliwong

🎷
cold slammin
View GitHub Profile
@a-s-o
a-s-o / Caddyfile
Last active January 6, 2021 10:28
Single page app rewriting with Caddy server
localhost:80
gzip
ext .html
root /home/deploy/current/build/www
proxy /graphql localhost:3000
rewrite /login {
to {path} /login
}
@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@JamesDullaghan
JamesDullaghan / digitalocean.md
Created July 6, 2013 20:54
Deploy rails app to digitalocean with nginx, unicorn, capistrano & postgres

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh [email protected]

Add ssh fingerprint and enter password provided in email

@slivero
slivero / dropshadow_modal.css
Created September 22, 2011 12:42
A nice modal box with css dropshadow
.modal {
position: absolute;
top:0;
left:0;
z-index: 2000;
height:300px;
width:400px;
background-color: white;
border-radius:10px;
border: 1px solid rgba(0, 0, 0, 0.3);
class ApplicationController < ActionController::Base
...
# FORCE to implement content_for in controller
def view_context
super.tap do |view|
(@_content_for || {}).each do |name,content|
view.content_for name, content
end
end
end