This file contains 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 | |
# 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 |
This file contains 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
# compress to 960:540 and reduce framerate to 30fps | |
ffmpeg -i input.mp4 -vf "fps=30,scale=960:540" output.mp4 | |
# cut fragment from 3 sec to 8 sec | |
ffmpeg -i input.mp4 -ss 00:00:03 -t 00:00:08 -async 1 -c copy fragment.mp4 | |
# concat files: create list and compress | |
for %%i in (*.mp4) do echo file '%%i'>> mylist.txt | |
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4 |
This file contains 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
alias paratest='php bin/console test:init:database:pool -e=test 10 && vendor/bin/paratest -f -p 10 —max-batch-size 5 —coverage-html=build/coverage' |
This file contains 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
# cleans all dangling images. This is useful for removing intermediate images left over from multiple builds | |
alias docker_clean_images='docker rmi $(docker images -a --filter=dangling=true -q)' | |
# for removing stopped containers | |
alias docker_clean_ps='docker rm $(docker ps --filter=status=exited --filter=status=created -q)' | |
# This would kill and remove all images in your cache | |
docker kill $(docker ps -q) | |
docker_clean_ps | |
docker rmi $(docker images -a -q) |
This file contains 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
Object.getValue = function(obj, path) { | |
if (typeof obj === 'undefined' || obj === null) return; | |
path = path.split(/[\.\[\]\"\']{1,2}/); | |
for (let i = 0, l = path.length; i < l; i += 1) { | |
if (path[i] !== '') { | |
obj = obj[path[i]]; | |
if (typeof obj === 'undefined' || obj === null) { | |
return; | |
} | |
} |
This file contains 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
<?php | |
declare(strict_types = 1); | |
namespace Tests\AppBundle\Form; | |
use Symfony\Component\Form\Extension\Core\CoreExtension; | |
use Symfony\Component\Form\Extension\Validator\ValidatorExtension; | |
use Symfony\Component\Form\Test\TypeTestCase as TestCase; | |
use Symfony\Component\Validator\ConstraintViolationList; |
This file contains 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
FROM php:7.1-fpm | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN TERM=xterm | |
RUN export TERM=xterm | |
RUN echo 'PS1="\[\033[36m\]\u\[\033[m\]@\[\033[95;1m\]docker-application:\[\033[34m\]\w\[\033[m\]\$ "' >> ~/.bashrc | |
RUN echo "alias console='php bin/console'" >> ~/.bashrc | |
RUN echo "alias phpunit='php bin/phpunit'" >> ~/.bashrc | |
RUN apt-get dist-upgrade -y |
This file contains 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
find /path/to/files* -mtime +5 -exec rm {} \; |
This file contains 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
class NumberSystem | |
{ | |
const DEFAULT_ALPHABET = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'; | |
public static function baseEncode($num, $alphabet = self::DEFAULT_ALPHABET) { | |
$baseCount = strlen($alphabet); | |
$encoded = ''; | |
while ($num >= $baseCount) { | |
$div = $num/$baseCount; | |
$mod = ($num-($baseCount* (int) $div)); |
This file contains 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
preg_replace('/((?:href|src) *= *[\'"](?!(\/\/|#|http|ftp)))/i', '$1' . $this->url, $value) |
NewerOlder