Skip to content

Instantly share code, notes, and snippets.

View shivan1b's full-sized avatar
:bowtie:
lernen

Shivani Bhardwaj shivan1b

:bowtie:
lernen
View GitHub Profile
@shivan1b
shivan1b / dup_rule_test_routine.md
Created March 25, 2019 11:40
Testing the duplicate rule processing with suricata-update

Go to your data directory (default: /var/lib/suricata)

cd /var/lib/suricata

There are two folders here update and rules. rules is the directory where the rules are finally written down either merged into suricata.rules or separately in different files. update is the directory consisting of cache and sources. cache consists of cached rules and these are the ones that are read by suricata update on a run.

Run suricata-update forcefully before implementing any changes to the rules.

@shivan1b
shivan1b / standard_commit.md
Created March 12, 2019 12:20
Code of standard for commit messages
  • Write a prefix defining the name of the module or file in which you're making changes e.g. if you made changes to the documentation in doc folder, add doc: prefix to commit message heading
  • Make sure your commit messages are descriptive
  • While
    • fixing bugs make sure to include test results in commit message showing what it looked like before your changes and after them
    • creating features make sure to include how to use it and what should be an ideal result
    • optimizing code make sure to include performance improvements
  • Wrap your commit messages to 80 char length
  • Use imperative mood for all sentences
@shivan1b
shivan1b / langmodel.py
Last active February 4, 2018 13:35
Django Model Choice constants using enum
from django import models
from enum import Enum
class Language(models.Model):
class DIALECT(Enum):
us_english = ('us_en', 'US English')
uk_english = ('uk_en', 'UK English')
spanish = ('es', 'Spanish')

Keybase proof

I hereby claim:

  • I am shivan1b on github.
  • I am shivani (https://keybase.io/shivani) on keybase.
  • I have a public key ASC2SHDUbzaxfl6TUhpbyQSaURaLQV-t1LtLsZACutal3wo

To claim this, I am signing this object: