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
| 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 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
| using System; | |
| using NUnit.Framework; | |
| using Rhino.Mocks; | |
| namespace Thing | |
| { | |
| public class Thing | |
| { | |
| private readonly IMesasgeService _messageService; |
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
| /* | |
| 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 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
| # 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 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
| watch -n 1 "lsof -a -p $(ps -ef | grep node | grep -v grep | awk '{print $2}') | wc -l" |
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
| 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 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
| #!/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 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
| 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 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
| # goes into ~/.inputrc or /etc/inputrc | |
| "\e[1;5C": forward-word | |
| "\e[1;5D": backward-word | |
| "\e[5C": forward-word | |
| "\e[5D": backward-word | |
| "\e\e[C": forward-word | |
| "\e\e[D": backward-word |
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
| println InetAddress.localHost.canonicalHostName |