Skip to content

Instantly share code, notes, and snippets.

View devCharles's full-sized avatar
:octocat:
koding </>

Charles Silva devCharles

:octocat:
koding </>
View GitHub Profile
@tixastronauta
tixastronauta / facebook_leads.md
Last active January 2, 2024 18:19
Receiving Facebook Leads on a Webhook
@odlp
odlp / gist:e02621612aae82a778c2
Created August 20, 2014 09:29
Distinct substring SQL query with Postgresql
result = ActiveRecord::Base.connection.execute("SELECT DISTINCT SUBSTRING(postcode, '[A-Z0-9]{3,} [0-9]{1}') FROM postcodes")
result.values.first
# => ['AB1 1']
@soheilhy
soheilhy / nginxproxy.md
Last active March 22, 2024 08:54
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a