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
cls | |
@echo Merging set of pdf files under %USERPROFILE%\Documents\mypdfs\ .. | |
@echo off | |
@echo. | |
set pdfpath= %USERPROFILE%\Documents\mypdfs\ | |
rem Enable this line to avoid long file path name problems: | |
rem set pdfpath=%SystemDrive%\1\ | |
for /r %pdfpath% %%i in (*.pdf) do echo | set /p pdfnames="%%i " >> %pdfpath%output3.txt | |
set /p outpdf=< %pdfpath%output3.txt | |
convert -density 180 %outpdf% %pdfpath%allinone.pdf |
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
REM Change the extension of the output file accordingly: | |
REM jpg jpeg,png,gif,tiff | |
cls | |
@echo Convert/Zip operation of pdfs started... | |
@echo off | |
@echo. | |
forfiles /m *.pdf /C "cmd /C convert -density 300 -compress lzw @file [email protected]" | |
dir *.png /B >> listfile.txt | |
"%ProgramFiles%\7-Zip\7z.exe" a -tzip -mx=8 pdf2png.zip @listfile.txt | |
del /q *.png |
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
<## | |
# | |
# | |
# MODULE OF: | |
# | |
# | |
# ..One-Hundred-and-One one-liners of powershell.. | |
# | |
# Author: Chris Dek. | |
# |
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
REM Use this file to extract a specific page from a pdf.. | |
cls | |
@echo off | |
@echo. | |
REM Default pdf files path.. | |
SET pdfpath=%USERPROFILE%\Documents\mypdfs\ | |
SET /P pagenum="Enter the pdf page you need here:" | |
SET /A "page=%pagenum%-1" | |
SET /P filename="Enter the pdf file name here:" | |
@echo. |
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
<# | |
Author: Chris Dek. | |
.Synopsis | |
This is a powershell utility script that redacts content (via black rounded rectangles) based on an image coordinate file. | |
Details for usage are shown in the sections below. | |
.Description | |
PDF file Content Redaction with usage of Imagemagick.This file generates the necessary ImageMagick commands to convert a set of images extracted from a pdf |
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
f=s=>{var t=[...s].reduce((c,i)=>i.charCodeAt(0)+c,0);return[1,2,3,4].map((n)=>n*t%256)} |
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
f=s=>{t=eval([...s].map((k,v)=>s.charCodeAt(v)).join('+'));return [1,2,3,4].map((n)=>n*t%256)} |
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
$d=(gps chrome*,security*|Select ProcessName,Id -First 1 -Last 1);$c=[String]::Concat($d.ProcessName.SubString(0,1).toLower());$o=$c[1]+$c[0];$v=$d[0].ProcessName+","+$d[0].Id+","+$d[1].ProcessName+","+$d[1].Id;Start-Process powershell.exe -ArgumentList @($o,"-Value $v","-Path .\Out1.txt"); |
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
f=s=>{k=t=0;[...s].map(c=>t+=s.charCodeAt(k++));return[1,2,3,4].map(n=>n*t%256)} |
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
f=s=>{k=t=0;for(c of s)t+=c.charCodeAt();return[1,2,3,4].map(n=>n*t%256)} |
OlderNewer