Skip to content

Instantly share code, notes, and snippets.

@Jamesits
Jamesits / caddy.sh
Last active January 27, 2024 14:47
Install Caddy Server on Ubuntu with Systemd.
# Should work on all Debian based distros with systemd; tested on Ubuntu 16.04+.
# This will by default install all plugins; you can customize this behavior on line 6. Selecting too many plugins can cause issues when downloading.
# Run as root (or sudo before every line) please. Note this is not designed to be run automatically; I recommend executing this line by line.
apt install curl
curl https://getcaddy.com | bash -s personal dns,docker,dyndns,hook.service,http.authz,http.awses,http.awslambda,http.cache,http.cgi,http.cors,http.datadog,http.expires,http.filemanager,http.filter,http.forwardproxy,http.geoip,http.git,http.gopkg,http.grpc,http.hugo,http.ipfilter,http.jekyll,http.jwt,http.locale,http.login,http.mailout,http.minify,http.nobots,http.prometheus,http.proxyprotocol,http.ratelimit,http.realip,http.reauth,http.restic,http.upload,http.webdav,net,tls.dns.auroradns,tls.dns.azure,tls.dns.cloudflare,tls.dns.cloudxns,tls.dns.digitalocean,tls.dns.dnsimple,tls.dns.dnsmadeeasy,tls.dns.dnspod,tls.dns.dyn,tls.
@macbre
macbre / book.md
Last active February 22, 2024 22:40
lubimyczytac.pl "API"
$ curl 'http://lubimyczytac.pl/ksiazka/264290' -s | grep -E '<meta|<link|sBookDescriptionLong'
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Language" content="pl" />
		<meta name="Description" content="Poznań, początek 1924 roku. Mieszkańcami miasta wstrząsa fala brutalnych morderstw. Z rąk nieznanego sprawcy giną prostytutki. Śledztwo prowadzą komisarz Antoni Fischer oraz jego zastępca Albin Siewierski. Ten pierwszy to dystyngowany i elokwentny oficer n" />
		<meta name="Keywords" content="" />
				<meta name="google-site-verification" content="mJetwv1NM4QIfTB8l0pw3d1JeakCq5rIuiF-7rdQb3w" />
        <meta name="LC_app_ver" content="83e373cf5c21cd1216a520fdc6bf7838" />
		<meta name="all-apver" content="426076ebc703102e66f5722e4abf70b380eec15e" />
		<link rel="stylesheet" type="text/css" media="screen, print" href="http://s.lubimyczytac.pl/skins/lc/css/lc_all_skin_lc.min.css?2015100802" />
@danharper
danharper / demo.md
Last active January 20, 2024 16:09
Open native Maps apps on iOS and Android in Cordova
iOS (with pin, iOS will lookup address too and show that as label)
maps://?q=LAT,LNG
Android, no pin (just open at location)
geo:LAT,LNG
# Thanks to this post:
# http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x
$ brew install cabextract
$ cd ~/Downloads
$ mkdir consolas
$ cd consolas
$ curl -O http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe
$ cabextract PowerPointViewer.exe
$ cabextract ppviewer.cab
@19h
19h / reset.js
Created February 19, 2013 22:51
Node.js — Clear Terminal / Console. Reset to initial state.
console.reset = function () {
return process.stdout.write('\033c');
}
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';