This file contains 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
LoadModule auth_kerb_module modules/mod_auth_kerb.so | |
LoadModule rewrite_module modules/mod_rewrite.so | |
<Location /services> | |
AuthType Kerberos | |
AuthName "Kerberos Login" | |
KrbMethodNegotiate On | |
KrbMethodK5Passwd On | |
KrbAuthRealms <DOMAIN-NAME> | |
Krb5KeyTab /etc/krb5.keytab |
This file contains 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
#!/bin/sh | |
# Flushing all rules | |
iptables -F | |
iptables -X | |
# Setting default filter policy | |
iptables -P INPUT DROP | |
iptables -P OUTPUT DROP | |
iptables -P FORWARD DROP |
This file contains 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
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
WHITE="\[\033[1;37m\]" | |
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
foo=${ref#refs/heads/} | |
status=$(git status -s | awk '{print $1}' 2>&1) | |
echo "$status" | grep M > /dev/null 2>&1 |
This file contains 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
watch -n 1 "lsof -a -p $(ps -ef | grep node | grep -v grep | awk '{print $2}') | wc -l" |
This file contains 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
# the IP(s) on which your node server is running. I chose port 3000. | |
upstream app_yourdomain { | |
server 127.0.0.1:3000; | |
} | |
# the nginx server instance | |
server { | |
listen 0.0.0.0:80; | |
server_name yourdomain.com yourdomain; | |
access_log /var/log/nginx/yourdomain.log; |
This file contains 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
/* | |
Usage: | |
var compile = require('build-utils').compile; | |
compile('less-src', 'public/css', function(lessFile, destFile) { | |
var cssFile = destFile.substr(0, destFile.indexOf('.less')) + '.css'; | |
run('./node_module/.bin/lessc' + lessFile + ' > ' + cssFile); | |
}); | |
*/ |
This file contains 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
using System; | |
using NUnit.Framework; | |
using Rhino.Mocks; | |
namespace Thing | |
{ | |
public class Thing | |
{ | |
private readonly IMesasgeService _messageService; |
This file contains 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
namespace Sample.DataAccess | |
{ | |
public abstract class Entity | |
{ | |
public virtual int Id { get; set; } | |
public virtual bool IsDeleted { get; set; } | |
} | |
public class Foo : Entity | |
{ |
This file contains 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
#!/usr/bin/env python | |
import dbus | |
class Client(): | |
def __init__(self): | |
bus = dbus.SessionBus() | |
service = bus.get_object('com.example.service', "/com/example/service") | |
self._message = service.get_dbus_method('get_message', 'com.example.service.Message') | |
self._quit = service.get_dbus_method('quit', 'com.example.service.Quit') |
This file contains 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
#!/bin/bash -ex | |
tar zcvf app.tgz ./app | |
cp installer-script-only.sh installer.sh | |
cat app.tgz >> installer.sh |