Skip to content

Instantly share code, notes, and snippets.

View whoo's full-sized avatar

Dominique DERRIER whoo

  • Transition
  • Montreal
View GitHub Profile
Add density before document
#convert -density 400 /tmp/pages.ps document.pdf
# convert -density 400 ../document -resize 2048x img%d.png
@whoo
whoo / testpointer.c
Created July 1, 2016 19:10
Transforme void into int | fun with pointer
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
void *a;
a=malloc(sizeof(int)*1);
*((int *)a)=25;
printf("%d",*(int*)a);
free(a);
@whoo
whoo / CheckPwd.pl
Last active June 29, 2016 01:36
CheckPassword Compliance
#!/usr/bin/perl
$Pwd=$ARGV[0];
$MinPwd=8;
chop($Pwd);
if ($Pwd=~/[[:upper:]]/) { $maj=1; } else { $maj=0; }
if ($Pwd=~/[[:digit:]]/) { $dig=1; } else { $dig=0; }
if ($Pwd=~/[[:punct:]]/) { $car=1; } else { $car=0; }
if ($Pwd=~/[[:lower:]]/) { $min=1; } else { $min=0; }
@whoo
whoo / VerifyIp.py
Last active June 28, 2016 02:04
Find Ip into subnet
#!/usr/bin/env python3
import ipaddress
### read ip from ip.txt
### check if there is a match in subnet files
ipfile=open("ip.txt")
for ip in [line[:-1] for line in ipfile]:
#!/bin/bash
#updated ffmpeg progress indicator
#by Rupert Plumridge
#for updates visit www.prupert.co.uk
#Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales Licence
# Based on the ffmpegprogress bar from: http://handybashscripts.blogspot.com/2011/01/ffmpeg-with-progress-bar-re-work.html
# which was based on my initital progress script - circle of life and all that ;)
# version 2.0
# 07.04.2011
# now uses apparently better progress detection, based on duration of overall video and progress along the conversion