Skip to content

Instantly share code, notes, and snippets.

View edwinpgm's full-sized avatar
🏡
Remotely

Edwin Gonzales edwinpgm

🏡
Remotely
View GitHub Profile
@edwinpgm
edwinpgm / docker-compose-mongo-replicaset.yml
Created September 29, 2020 13:24 — forked from asoorm/docker-compose-mongo-replicaset.yml
Mongo Replica Set docker compose
version: "3"
services:
mongo1:
hostname: mongo1
container_name: localmongo1
image: mongo:4.0-xenial
expose:
- 27017
ports:
- 27011:27017

Intercom user_hash

Remember that your secret key should never be exposed to the public

  • So Javascript code below should only be used for testing unless modified and used to run on a server
@edwinpgm
edwinpgm / 1_query_timestamp.js
Created April 1, 2016 03:59 — forked from katowulf/1_query_timestamp.js
Get only new items from Firebase
// assumes you add a timestamp field to each record (see Firebase.ServerValue.TIMESTAMP)
// pros: fast and done server-side (less bandwidth, faster response), simple
// cons: a few bytes on each record for the timestamp
var ref = new Firebase(...);
ref.orderByChild('timestamp').startAt(Date.now()).on('child_added', function(snapshot) {
console.log('new record', snap.key());
});
<div class="social">
<span class="twitter">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="[your-url-here]">Tweet</a>
</span>
<span class="google">
<g:plusone size="medium" href="[your-url-here]"></g:plusone>
</span>
<span class="Facebook">
<iframe src="https://www.facebook.com/plugins/like.php?href=[your-url-here]&amp;show_faces=false&amp;layout=button_count" scrolling="no" frameborder="0" style="height: 21px; width: 100px" allowTransparency="true"></iframe>
</span>
.fb-comments{
width 100% !important
}
.fb-comments iframe, .fb-comments span {
width 100% !important
}
# Instalación de paqueterias
sudo apt-get install libapache2-mod-wsgi
# Vamos a la carpeta
cd /etc/apache2
# Agregamos esta linea dentro del http.conf (site 1, site 2, depende la configuración de sus virtual host) Tiene que apuntar directo a un archivo .wsgi que tiene que estar preferente mente alado de la carpeta de su proyecto.
WSGIScriptAlias / /home/ajamaica/django.wsgi