Skip to content

Instantly share code, notes, and snippets.

View aregee's full-sized avatar
🎯
“continuously refactoring towards deeper insight”

Rahul Gaur aregee

🎯
“continuously refactoring towards deeper insight”
View GitHub Profile
var orm = appRequire('orm');
var _ = require('lodash');
var db = orm.table;
module.exports = function(teteris) {
teteris('socialAuth').on('error', (e) => {
console.log('WORKER ERROR', e);
});
@aregee
aregee / rc.lua
Created February 26, 2016 20:36
awesome wm config
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- Load Debian menu entries
require("debian.menu")
@aregee
aregee / introrx.md
Created February 1, 2016 11:13 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@aregee
aregee / nginx.conf
Created January 28, 2016 13:59 — forked from calebwoods/nginx.conf
Sample Nginx config for deployment of Angular.js app
server { listen 80;
server_name example.com;
access_log /var/log/example.com/nginx.access.log;
error_log /var/log/example.com/nginx.error.log;
root /var/www/apps/example.com/public;
charset utf-8;
location / {
rewrite ^ https://$host$request_uri? permanent;
}
pid logs/nginx.pid;
error_log logs/nginx-main_error.log debug;
# Development Mode
master_process off;
daemon off;
worker_rlimit_core 2500M;
working_directory /tmp;
debug_points abort;
env MOCKEAGAIN_VERBOSE;
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5700
temp-night=3500
; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature.
transition=1
app.get(/(.*\.pdf)\/([0-9]+).png$/i, function (req, res) {
var pdfPath = req.params[0];
var pageNumber = req.params[1];
var PDFImage = require("pdf-image").PDFImage;
var pdfImage = new PDFImage(pdfPath);
pdfImage.convertPage(pageNumber).then(function (imagePath) {
res.sendFile(imagePath);
}, function (err) {
sudo tar -C /usr/local --strip-components 1 -xvf node-v4.1.0-linux-x64.tar.gz
pid logs/nginx.pid;
error_log logs/nginx-main_error.log debug;
# Development Mode
master_process off;
daemon off;
worker_rlimit_core 2500M;
working_directory /tmp;
debug_points abort;
env MOCKEAGAIN_VERBOSE;