Skip to content

Instantly share code, notes, and snippets.

View hourback's full-sized avatar

Ali Jonathan Nabavi hourback

View GitHub Profile
@bzamecnik
bzamecnik / wordpress_com_nginx_proxy_to_subpath.md
Created June 21, 2018 12:48
Nginx proxy for Wordpress.com on custom domain with subpath.
@clarkdave
clarkdave / logstash-sentry.rb
Last active May 15, 2023 11:34
(Logstash) Sentry output plugin
# The MIT License (MIT)
# Copyright (c) 2014 Dave Clark
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@alanfranz
alanfranz / tomcat.conf
Last active December 25, 2015 02:29 — forked from witscher/tomcat.conf
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# run as non privileged user
# add user with this command:
## adduser --system --ingroup www-data --home /opt/apache-tomcat apache-tomcat
@stuart-warren
stuart-warren / Exception.rb
Last active October 28, 2022 13:37
Windows Event log via nxlog (json) -> logstash 1.2 config
Exception in filterworker {"exception"=>#<NoMethodError: undefined method `[]=' for nil:NilClass>, "backtrace"=>["file:/opt/logstash/logstash.jar!/logstash/event.rb:135:in `[]='", "org/jruby/RubyProc.java:255:in `call'", "(eval):9:in `exec'", "org/jruby/RubyProc.java:255:in `call'", "file:/opt/logstash/logstash.jar!/logstash/util/fieldreference.rb:44:in `exec'", "file:/opt/logstash/logstash.jar!/logstash/event.rb:134:in `[]='", "file:/opt/logstash/logstash.jar!/logstash/filters/mutate.rb:234:in `rename'", "org/jruby/RubyHash.java:1332:in `each'", "file:/opt/logstash/logstash.jar!/logstash/filters/mutate.rb:232:in `rename'", "file:/opt/logstash/logstash.jar!/logstash/filters/mutate.rb:205:in `filter'", "(eval):127:in `initialize'", "org/jruby/RubyProc.java:255:in `call'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:243:in `filter'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:191:in `filterworker'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:134:in `start_filters'"], :level=>:
@dreeves
dreeves / snooze.js
Created September 8, 2012 00:54
Email Snooze
/* EMAIL SNOOZE
Inspired by: http://lifehacker.com/5825634/how-to-add-a-snooze-button-to-gmail
and http://messymatters.com/email
Docs: https://developers.google.com/apps-script/service_docslist
Initial Setup Instructions:
Create a new google docs spreadsheet (sic) and then select
Tools > Script Editor
and paste in this code.
@sirkitree
sirkitree / gist:3290480
Created August 7, 2012 23:21
npm error installing jitsu
$ sudo npm install jitsu -g 1 ↵ ⚡(master*)
Password:
npm http GET https://registry.npmjs.org/jitsu
npm http 200 https://registry.npmjs.org/jitsu
npm http GET https://registry.npmjs.org/jitsu/-/jitsu-0.9.6.tgz
npm http 200 https://registry.npmjs.org/jitsu/-/jitsu-0.9.6.tgz
npm http GET https://registry.npmjs.org/complete/0.3.1
npm http GET https://registry.npmjs.org/dateformat/1.0.2-1.2.3
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http GET https://registry.npmjs.org/flatiron-cli-config/0.1.3
@botic
botic / simple-test.js
Created July 18, 2012 17:09
RingoJS testing
var assert = require("assert");
var log = require("ringo/logging").getLogger(module.id);
var myLittleTestVar = false;
exports.setUp = function() {
log.info("[SET_UP] My little test var: " + myLittleTestVar);
myLittleTestVar = true;
log.info("[SET_UP] My little test var: " + myLittleTestVar);
};
@witscher
witscher / tomcat.conf
Created June 13, 2012 13:24
Apache Tomcat Upstart script
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# run as non privileged user
# add user with this command:
## adduser --system --ingroup www-data --home /opt/apache-tomcat apache-tomcat
@nathanpc
nathanpc / phonegap_download_example.html
Created April 22, 2012 13:11
Sample code to download file from internet - Phonegap Wiki
<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- Android
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
<meta charset="utf-8">-->
<!-- iPad/iPhone specific css below, add after your main css >
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation