Skip to content

Instantly share code, notes, and snippets.

@shmaltorhbooks
shmaltorhbooks / parent.php
Last active December 17, 2015 06:49 — forked from ephrin/parent.php
Call method from parent class with unknown arguments length
<?php
class Demo extends ParentClass
{
function demoParent(...$arguments)
{
// some overrided logic
return (new \ReflectionClass(get_class($this)))
->getParentClass()
->getMethod(__METHOD__)
http {
map $http_user_agent $limit_bots {
default '';
~*(google|bing|yandex|msnbot) $binary_remote_addr;
}
limit_req_zone $limit_bots zone=bots:10m rate=1r/m;
server {
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html
MyEntity:
type: entity
repositoryClass: MyRepositoryClass
table: my_entity
namedQueries:
all: "SELECT u FROM __CLASS__ u"
# Class-Table-Inheritance
@shmaltorhbooks
shmaltorhbooks / tc-brute.sh
Created November 29, 2022 13:26 — forked from melpomene/tc-brute.sh
Truecrypt brute force script
#!/bin/sh
# Before use:
# * Put line seperated wordlist in file 'wordlist'
# * Change device /dev/sdX to the drive/file you want to brute force
# Call with 'sudo tc-brute.sh < wordlist'.
while read line
do
if truecrypt -t -k "" --protect-hidden=no --non-interactive /dev/sdX -p $line