Skip to content

Instantly share code, notes, and snippets.

View gitowiec's full-sized avatar
🎯
Focusing

Marek gitowiec

🎯
Focusing
  • Gdańsk
View GitHub Profile
@gitowiec
gitowiec / curl-loop.sh
Created March 22, 2021 09:20 — forked from shrop/curl-loop.sh
Script to loop through a text file list of URLs and output the curl -I to a text file
#!/bin/bash
for i in $(cat urls.txt); do
content=$(curl -I -s "{$i}")
echo "URL: $i" >> output.txt
echo "$content" >> output.txt
done
@gitowiec
gitowiec / bad-npm-modules.md
Created December 21, 2020 11:59
The list of bad NPM modules I don't want to use
  1. https://github.com/guigrpa/docx-templates - Docx-template turned out not to provide basic support for the declared API. I spent a few days on it, ended up reporting a few bugs to the author and removing this dependency from the project. The module doesn't allow you to format the text, and the use of moronic tags ruins the docx document layout. Waste of time!
@gitowiec
gitowiec / qemu-kvm-freezes
Created June 24, 2019 13:59
Qemu/kvm freezes running Ubuntu Budgie 19.04 guest on Ubuntu Budgie 18.04 host (5.1.4-050104-generic version of host kernel installed with ukuu)
Error pausing domain: Timed out during operation: cannot acquire state change lock (held by remoteDispatchDomainSuspend)
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 82, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1512, in suspend
@gitowiec
gitowiec / dump.sql
Last active March 25, 2019 22:03
Malware written using PHP, found on my webpage
CREATE TABLE `wp_old_lcache` (
`newid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`urlhash` TINYTEXT NULL,
`setts` LONGBLOB NULL,
`extlinks` LONGBLOB NULL,
`ownlinks` LONGBLOB NULL,
PRIMARY KEY (`newid`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
'use strict';
/*
# Javascript Prototyping Best Practices
* To create a class, create a constructor function with a `Name` and assign
it to a variable of the same `Name`.
* In this constructor only define properties using `this.prop` notation
@gitowiec
gitowiec / Xorg.0.log
Created May 13, 2017 12:01
Xorg.log after issuing sudo xrandr --setprovideroutputsource 1 0 to run Dell D3100 EVDI
[ 23.389]
X.Org X Server 1.19.2
Release Date: 2017-03-02
[ 23.389] X Protocol Version 11, Revision 0
[ 23.389] Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
[ 23.389] Current Operating System: Linux inspiron42 4.9.0-2-amd64 #1 SMP Debian 4.9.18-1 (2017-03-30) x86_64
[ 23.389] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-2-amd64 root=UUID=ee91afb2-1664-4bf2-9044-9196fb3b73c4 ro initrd=/install/initrd.gz quiet
[ 23.390] Build Date: 03 March 2017 03:14:41PM
[ 23.390] xorg-server 2:1.19.2-1 (https://www.debian.org/support)
[ 23.390] Current version of pixman: 0.34.0
@gitowiec
gitowiec / sync-prod.sh
Created April 13, 2017 00:14 — forked from retlehs/sync-prod.sh
WP-CLI aliases sync example
read -r -p "Would you really like to reset your development database and pull the latest from production? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
wp @development db reset --yes &&
wp @production db export - > sql-dump-production.sql &&
wp @development db import sql-dump-production.sql &&
wp @development search-replace https://example.com https://example.dev
fi
/*!
* Document : Fart.js (Easter egg)
* Created on : 28.10.2013, 13:42
* Author : dawidz
* Copyright : Copyright (c) 2013 Engine Sp. z o.o. (http://www.engine.pl)
*/
/*!
* Fart Sounds