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
#!/bin/sh | |
curl https://covid19.innews.gr | gunzip > covid.html | |
cat covid.html | grep daily_stats | cut -d "=" -f2 | sed 's/^.//;s/.$//' > daily_stats.json | |
cat covid.html | grep weekly_stats | cut -d "=" -f2 | sed 's/^.//;s/.$//' > weekly_stats.json | |
cat covid.html | grep three_days_stats | cut -d "=" -f2 | sed 's/^.//;s/.$//' > three_days_stats.json | |
cat covid.html | grep last_stats | cut -d "=" -f2 | sed 's/^.//;s/.$//' > today_stats.json | |
cat covid.html | grep total_stats | cut -d "=" -f2 | sed 's/^.//;s/.$//' > total_stats.json | |
rm covid.html |
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
wget -qO- --header="Accept: application/x-bibtex" "https://doi.org/10.1109/5.771073" |
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
vim $(grep -lR "$(sk --ansi -i -c 'grep -lER "{}" .issues/issues/ | grep -v tags | grep -v comments | xargs head -q -n 1')" .issues/issues/) |
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
import { useState, useEffect, useCallback } from 'react'; | |
import { AppState, AppStateStatus } from 'react-native'; | |
const useAppState = () => { | |
const [appState, setAppState] = useState(AppState.currentState); | |
const handleAppStateChange = useCallback( | |
(nextAppState: AppStateStatus) => { | |
setAppState(nextAppState); | |
}, | |
[setAppState], |
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
#!/bin/bash | |
# Script to install PostgreSQL and PostGIS on a fresh Amazon Linux instance | |
# Installing from source: | |
# - GEOS | |
# GEOS 3.10+ requires CMake 3+, not readily available on Amazon Linux 2. | |
GEOSVER=3.9.2 | |
GEOSURL=http://download.osgeo.org/geos/geos-${GEOSVER}.tar.bz2 | |
# - PROJ (GDAL requires 6+; 6.2.1 is the last to use SQLite 3.7; 6.2 had build issues, so 6.1.1) |
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
/** | |
* Building Maintainable Software - Ten Guidelines for Future Proof Code | |
* https://www.amazon.com/Building-Maintainable-Software-Java-Future-Proof/dp/1491953527 | |
* | |
* Write Simple Units of Code - Dealing with Nesting, page 36. | |
* | |
* I like the example on page 36 because it's simple and just enough to demonstrate how hard is | |
* to write straightforward code, or how easy is to increase the Accidental Complexity of the code. | |
* | |
* There are 4 implementations of the same functionality. The first one is the original code, |
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
git diff -- . ':!directory_name' |
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
#!/usr/bin/env bash | |
TEMPFILE=/tmp/unixcount | |
exist=0 | |
notexist=0 | |
echo 0 0 > $TEMPFILE | |
curl "https://raw.githubusercontent.com/dspinellis/unix-v4man/master/man0/ptxx"| | |
grep "(I)"| |
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
/** | |
* USB HID Keyboard scan codes as per USB spec 1.11 | |
* plus some additional codes | |
* | |
* Created by MightyPork, 2016 | |
* Public domain | |
* | |
* Adapted from: | |
* https://source.android.com/devices/input/keyboard-devices.html | |
*/ |
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
#EXTM3U | |
# TECSUN PL-505 ~ Location: 37.975288, 23.625487 | |
#EXTINF:0,087.50 ~ Κρήτη FM - 087.50 ~ Κρήτη FM | |
http://s3.onweb.gr:8878 | |
#EXTINF:0,087.70 ~ En Lefko - 087.70 ~ En Lefko | |
https://stream.radiojar.com/enlefko877 | |
#EXTINF:0,088.00 ~ Μέντα - 088.00 ~ Μέντα | |
https://stream.radiojar.com/menta.aac | |
# 088.30 ~ ? - 088.30 ~ ? | |
#EXTINF:0,088.60 ~ Kids Radio - 088.60 ~ Kids Radio |
NewerOlder