Skip to content

Instantly share code, notes, and snippets.

View Sapphire64's full-sized avatar

Anton Vlasenko Sapphire64

View GitHub Profile
@Sapphire64
Sapphire64 / supervisor-usage.txt
Last active December 12, 2015 08:29 — forked from didip/supervisord-example.conf
Added supervisord controls
Supervisor controls
$ supervisorctl status ; Status
$ supervisorctl restart projectname ; Restart App
$ supervisorctl stop projectname ; Stop App
$ supervisorctl start projectname ; Start App
$ supervisorctl tail projectname : ??? App :D
//
// CRUD API for RESTful services with URLs similar 'http://services.mysite.com/classes/Book'.
//
// e.g. parse.get(
// "Book",
// 123,
// function(response){ console.log(response.toString());}
// );
//
services.factory('parse', function($rootScope, $http) {
@Sapphire64
Sapphire64 / supervisord-example.conf
Last active December 11, 2017 11:35 — forked from didip/supervisord-example.conf
Running virtualenv tornado in supervisord, running virtualenv celery in supervisord
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
/**
* @see https://github.com/siongui/palidictionary/blob/master/static/js/draggable.js
* @see http://docs.angularjs.org/guide/compiler
*/
angular.module('draggableModule', []).
directive('draggable', ['$document' , function($document) {
return {
restrict: 'A',
link: function(scope, elm, attrs) {
#!/usr/bin/env python
""" Script to scrape images from a flickr account.
Author: Ralph Bean <[email protected]>
"""
import ConfigParser
import urllib
import requests