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
'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 / 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