Skip to main content
GrN.dk

Main navigation

  • Articles
  • Contact
  • Your Digital Project Manager
  • About Greg Nowak
  • Services
  • Portfolio
  • Container
    • Excel Freelancer
    • Kubuntu - tips and tricks
    • Linux Apache MySQL and PHP
    • News
    • Image Gallery
User account menu
  • Log in

Breadcrumb

  1. Home

Script

By Greg Nowak, 26 February, 2021

PDF to Word Conversion

There are many tools and a lot of software out there to convert PDFs to Word.

Online tools like:

GrN.dk

convertio.co
altoconvertpdftoword.com

Tags

  • Script
  • pdf
By Greg Nowak, 25 February, 2021

Get Current Working Directory In Any Window Linux Bash

readlink -e /proc/$(xprop -id $(xdotool getactivewindow) _NET_WM_PID | awk '{print $3}')/cwd

Inspired by: https://superuser.com/questions/1116636/open-a-terminal-from-any-direct…

Tags

  • Linux
  • Script
By Greg Nowak, 12 November, 2020

Linux Show Final URL Programatically

curl tags: https://stackoverflow.com/questions/3074288/get-final-url-after-curl-is…

How to solve CloudFlare protection: https://stackoverflow.com/questions/18500088/curl-load-a-site-with-clou…

Tags

  • Linux
  • Script
By Greg Nowak, 28 October, 2020

Strip Metadata

PDF

https://blog.joshlemon.com.au/protecting-your-pdf-files-and-metadata/

https://gist.github.com/hubgit/6078384

exiftool -all:all= $FILE ; qpdf --linearize $FILE output.pdf

Images

imagemagick: mogrify -strip NAME_OF_FILE

 

Test with: exiftool -all NAME_OF_FILE

 

Tags

  • Script
  • Linux
By Greg Nowak, 10 June, 2020

Recently Installed Packages Ubuntu

Try this from the terminal: grep " install " /var/log/dpkg.log

Tags

  • Script
By Greg Nowak, 4 June, 2020

Converting PNG to SVG

In a lot of cases it is useful to convert bitmaps like jpg, png to vector graphics like SVG or AI.

Inkscape -> Path -> Trace Bitmap

BASH

convert file.png file.pnm
potrace file.pnm -s -o file.svg

Tags

  • bash
  • Script
  • graphics
By Greg Nowak, 4 April, 2020

Find and replace string in files recursively

This is the best option I have found so far: find . -type f -exec sed -i 's/foo/bar/g' {} +
foo is replaced with bar.

Source: https://linuxize.com/post/how-to-use-sed-to-find-and-replace-string-in-…

Also quite handy to be able to search and replace filenames.

Tags

  • Script
By Greg Nowak, 30 May, 2019

Composer tips and tricks

Composer without root

Run this in ~/composer: curl -sS https://getcomposer.org/installer | php

Put this in .bashrc: alias composer="php ~/composer/composer.phar"

Install Drupal 8 With Composer In Custom Web Folder

composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --no-interaction --no-install
Adjust web folder in composer.json file and then run "composer install".

Check available versions of a package

composer show package_name --available

Tags

  • Linux
  • Script
  • Web
By Greg Nowak, 20 November, 2017

Upgrading PHP 5 to PHP 7

A couple of notes on upgrading from PHP 5 to PHP 7.

Firstly you can try to copy your site or code to a server with PHP 7 and see how your PHP 5 application runs and then move forward. You can also try to use a tool to help you with finding code that needs to be upgraded and reading the documentation. See the links below.

Tags

  • Script
By Greg Nowak, 9 November, 2017

Fix mailR java issues

You might have a couple of issues with mailR when running on a server.

When installing or after installing the r package: rJava you might encounter the following: libjvm.so: cannot open shared object file: No such file or directory

I fixed this on a ubuntu server with this command: sudo R CMD javareconf
 

Tags

  • Linux
  • Script
  • r-project

Pagination

  • Previous page
  • 2
  • Next page
Script

Review Greg on Google

Greg Nowak Google Reviews

 

  • Tidy Up composer.json with Composer Normalize
  • Drupal 8 Custom Taxonomy View Hierarchy: Practical Ways to Show Nested Terms
  • WordPress Custom Fields: A Practical Guide for Structured Content
  • Website AI chat and lead-capture bots need prompt-injection controls before rollout
  • How to Move Drupal Blocks to a Different Region on Mobile Devices
RSS feed

GrN.dk web platforms, web optimization, data analysis, data handling and logistics.