Skip to content

Instantly share code, notes, and snippets.

View orjanv's full-sized avatar

Ørjan Hoyd H. Vøllestad orjanv

View GitHub Profile
@orjanv
orjanv / bash-one-liners.txt
Last active January 27, 2021 16:36
my short but growing list of bash one-liners i find useful
# Print specific line in file with sed
sed -n '07p' filename
# print line in file matching weeknumber
sed -n ''$(date +%V)'p' filename
# remove blank lines
sed '/^\s*$/d'
# print longest line in file
@ghiculescu
ghiculescu / gist:6352625
Created August 27, 2013 11:58
Jekyll nginx config
server {
listen 80; # listen on http (port 80)
server_name blog.example.com; # the domain name people will access your site at
root /home/deployer/docs; # path to deploy to, eg: "/home/#{user}/docs". this should match whatever was in your Capistrano deploy file.
expires 1d; # how long should static files be cached for, see http://nginx.org/en/docs/http/ngx_http_headers_module.html for options.
}