This file contains hidden or 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/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 |
This file contains hidden or 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
#!/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]: |
This file contains hidden or 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
#!/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; } |
This file contains hidden or 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
#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); |
This file contains hidden or 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
Add density before document | |
#convert -density 400 /tmp/pages.ps document.pdf | |
# convert -density 400 ../document -resize 2048x img%d.png | |
This file contains hidden or 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/bash | |
# $1 http://lci.tf1.fr/jt-13h/videos/2016/le-13-heures-du-14-juillet-2016-8764691.html | |
URL=$(wget -q "$1" -O- | perl -nle 'print $a if ($a) = $_ =~m|embedframe/.*c0K11([0-9]*)|' | |
echo $URL | |
mpv http://www.wat.tv/get/iphone/$URL.m3u8 |
This file contains hidden or 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
cols=shutil.get_terminal_size((80, 20)).columns | |
MAX=cols-15 | |
def pbar(cur,size): | |
elmt=int(cur/size*MAX) | |
print("\033[?25l",end="") | |
print("\033[0G[",end="") | |
print("#"*elmt,end="") | |
print("."*(MAX-elmt),end="") | |
print("] %d"%cur,end="") |
This file contains hidden or 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/bash | |
function Relink | |
{ | |
x=1 | |
for a in $OLDPWD/*JPG | |
do | |
c=$(printf %04d.jpg $x) | |
ln -s "$a" $c | |
x=$(($x+1)) |
This file contains hidden or 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
int pingTCP(char *host) | |
{ | |
int sockfd,ping=0; | |
struct hostent *hostent; | |
struct sockaddr_in sockaddr_in; | |
fd_set fdset; | |
struct timeval tv; | |
This file contains hidden or 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
GET /_cat/indices?v | |
POST /_reindex?refresh&wait_for_completion=false | |
{ | |
"source": { | |
"index": "logstash-2017.03.*" | |
}, | |
"dest": { | |
"index": "logstash-2017-q1" | |
} | |
} |
OlderNewer