This is a set of instructions to setup a Django Nginx Gunicorn MySQL/Postgres stack on a single Amazon EC2 instance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| // Override Slack CSS | |
| // Open: C:\Users\<username>\AppData\Local\slack\app-4.0.0\resources | |
| // npm install -g asar | |
| // asar extract-file app.asar dist/ssb-interop.bundle.js | |
| document.addEventListener('DOMContentLoaded', function() { | |
| $.ajax({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pyelasticsearch import ElasticSearch, ElasticHttpNotFoundError | |
| from pyparsing import * | |
| import unittest | |
| ELASTICSEARCH_INDEX = 'myindex' | |
| ELASTICSEARCH_URL = 'http://localhost:9200/' | |
| es = ElasticSearch(ELASTICSEARCH_URL) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void clear_numbers(int vector[], int s) { | |
| char cleared_vector[Size]; | |
| int index_original_vector = 0; | |
| int index_cleared_vector = 0; | |
| int same_count = 0; | |
| while (index_original_vector < s) { | |
| printf("%d,", index_original_vector); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function loadMore() { | |
| $("html, body").animate({ scrollTop: $(document).height() }, 500); | |
| if ( $('.js-infinite-marker').length > 0 ) { | |
| setTimeout(loadMore, 500); | |
| } else { | |
| var times = {}; | |
| $('.list-item').each(function() { | |
| var href = $(this).find('.item-title a').attr('href'); | |
| var t = $(this).find('time').data('text-time'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Install Linux updates, set time zones, followed by GCC and Make | |
| sudo yum -y update | |
| sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \ | |
| /etc/localtime | |
| sudo yum -y install gcc make | |
| 2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import win32serviceutil | |
| import win32service | |
| import win32event | |
| import servicemanager | |
| import socket | |
| import time | |
| import logging | |
| logging.basicConfig( | |
| filename = 'c:\\Temp\\hello-service.log', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| import pickle | |
| import console | |
| # I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder | |
| sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')] | |
| import dropboxlogin # this code can be found here https://gist.github.com/4034526 | |
| STATE_FILE = '.dropbox_state' |