Skip to content

Instantly share code, notes, and snippets.

{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36",
"benchmarkIndex": 1320
},
"lighthouseVersion": "5.7.0",
"fetchTime": "2020-04-22T15:36:12.990Z",
"requestedUrl": "https://realtyinorlando.com/",
# add-whitespace-only.bash
for fname in $(git diff --name-only --diff-filter=ACMR --full-index HEAD)
do
diff=$(git diff -w --ignore-blank-lines --exit-code $fname)
if [ $? -eq 0 ]; then
echo "only whitespace diff on $fname ! adding to git..."
git add $fname
else
echo "diff on $fname!"
fi
function tabs_or_spaces () {
spaces = $(grep -P '^ *' "$@" | wc -l);
tabs = $(grep -P '^\t' "$@" | wc -l);
echo "Number of Spaces: $spaces"
echo "Number of Tabs: $tabs"
}
@hatzopoulos
hatzopoulos / sed1line.txt
Last active March 8, 2018 06:51 — forked from un33k/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file. Useful One-Line Scripts For SED (Unix Stream Editor). From http://sed.sourceforge.net/sed1line.txt
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
This file will also available in other languages:
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
This file will also available in other languages:
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html
@hatzopoulos
hatzopoulos / fftb.php
Last active October 5, 2015 22:07 — forked from rewmike/fftb.php
fftb.php
<?php
// Set content type and disable encoding
header('Content-Type: text/html; charset=UTF-8');
while (@ob_get_level()) ob_end_flush();
ob_start();
// Send some content
function padding () {
@hatzopoulos
hatzopoulos / web-dev-kits.md
Last active September 5, 2015 14:30
web development kits
@hatzopoulos
hatzopoulos / rewrite-history.bash
Last active August 29, 2015 14:27
rewrite-history.bash
#!/bin/bash
# usage:
# cd ~/your-repo
# git filter-branch --prune-empty --tree-filter ~/rewrite-history.bash
if [[ ! -e httpdocs ]]; then
mkdir -p httpdocs
git ls-tree --name-only $GIT_COMMIT | grep -v ^'.gitignore\|.gitattributes'$ | xargs -I files mv files httpdocs
fi