Skip to content

Instantly share code, notes, and snippets.

@pazdera
pazdera / object_pool.cpp
Created August 4, 2011 09:29
Example of `object pool' design pattern in C++
/*
* Example of `object pool' design pattern
* Copyright (C) 2011 Radek Pazdera
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
@pazdera
pazdera / brute_force_string.c
Created August 3, 2011 17:54
Basic string generation for brute-force attacks
/*
* Basic string generation for brute-force attacks
* Copyright (C) 2011 Radek Pazdera
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
@pazdera
pazdera / prototype.py
Created August 3, 2011 10:45
Example of `prototype' design pattern in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of `prototype' design pattern
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@pazdera
pazdera / prototype.cpp
Created August 3, 2011 10:36
Example of `prototype' design pattern in C++
/*
* Example of `prototype' design pattern.
* Copyright (C) 2011 Radek Pazdera
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
@pazdera
pazdera / gist:1121315
Created August 2, 2011 21:47
Brute-force string generation in Python (optimized for printable characters only)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Brute-force string generation
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@pazdera
pazdera / builder.py
Created August 2, 2011 20:35
Example of `builder' design pattern in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of `builder' design pattern
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@pazdera
pazdera / builder.cpp
Created August 2, 2011 20:33
Example of `builder' design pattern in C++
/*
* Example of `builder' design pattern.
* Copyright (C) 2011 Radek Pazdera
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@pazdera
pazdera / brute_force_string.py
Created July 31, 2011 11:14
Brute-force string generation in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Brute-force string generation
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@pazdera
pazdera / abstract_factory_example.py
Created July 24, 2011 13:37
Example of `abstract factory' design pattern in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of `abstract factory' design pattern
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@pazdera
pazdera / abstract_factory_example.cpp
Created July 24, 2011 11:53
Example of `abstract factory' design pattern in C++
/*
* Example of `abstract factory' design pattern.
* Copyright (C) 2011 Radek Pazdera
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,