Skip to content

Instantly share code, notes, and snippets.

View kiranps's full-sized avatar

kiran ps kiranps

  • Bangalore
View GitHub Profile
@kiranps
kiranps / example.server.config
Created May 14, 2016 07:38 — forked from Munter/example.server.config
Nginx example setup for a single page web application with far future expires static content in /static/ and proxying to several backends on any other request that /static or /.
upstream backends {
ip_hash;
server 0.0.0.0:80;
server 0.0.0.0:80;
}
server {
server_name app.falconsocial.com;
@kiranps
kiranps / post_xml.rb
Last active August 29, 2015 14:26 — forked from mattriley/post_xml.rb
Ruby HTTP POST request containing XML content
require 'net/http'
def post_xml url_string, xml_string
uri = URI.parse url_string
request = Net::HTTP::Post.new uri.path
request.body = xml_string
request.content_type = 'text/xml'
response = Net::HTTP.new(uri.host, uri.port).start { |http| http.request request }
response.body
end

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname