Skip to content

Instantly share code, notes, and snippets.

abstract class BaseClass
{
public abstract void Go();
}
class AClass : BaseClass
{
public override void Go()
{
Console.WriteLine("I am A");
100 Signs that I May Be Writing Spaghetti Code
-----------------------------------------------------------------------
100. I have no idea where this constant is defined.
99. I have echo stmts littered throughout my code.
98. There is an error but it isn't handled, and I can't find it to figure out what's wrong.
@eternnoir
eternnoir / network
Created March 4, 2016 05:14
network
+--------+ +----------+
| CHT +-------> Router |
+--------+ +----+-----+
|
+----v-----+
| Switch |
+----+-----+
|
|
+------------------------------+--------------+
# fortify global
#when set to true places all thick tools into debug mode
#com.fortify.Debug=true
@eternnoir
eternnoir / is_alive.py
Created January 13, 2016 06:32
Check site alive script.
import urllib; import sys; sys.exit(0) if urllib.urlopen("http://www.google.com").getcode() == 200 else sys.exit(1)
@eternnoir
eternnoir / Createmodelclass.sql
Last active April 16, 2019 13:12
Create model class
declare @TableName sysname = 'TableName'
declare @Result varchar(max) = 'public class ' + @TableName + '
{'
select @Result = @Result + '
public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; }
'
from
(
select
#!/bin/bash
## Mandatory variables
sessionStart="UNSET"
clientHostAddress="UNSET"
clientUID="UNSET"
sessionDuration="UNSET"
txVolume="UNSET"
rxVolume="UNSET"
@eternnoir
eternnoir / pptp.sh
Last active February 8, 2022 00:20
pptp
#!/bin/sh
if [ `id -u` -ne 0 ]
then
echo "please run it by root"
exit 0
fi
apt-get -y update
apt-get -y install pptpd || {
#!/usr/bin/env bash
# Pre-requisites
sudo apt-get -y update
sudo apt-get --no-install-recommends -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev vim
# Download and compile Ruby 2.0.0-p0
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
tar -xvzf ruby-2.0.0-p0.tar.gz
@eternnoir
eternnoir / .vimrc
Created October 15, 2015 02:56
vimrc
"*****************************************************************************
"" NeoBundle core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif