Skip to content

Instantly share code, notes, and snippets.

{
"Announcements":[
{
"ID":"3",
"Title":"Title",
"Text":"Text",
"Link":"https://",
"minVersion":0,
"maxVersion":2029,
"Expires":"1970-01-01T00:00:00Z"
@M66B
M66B / themes-debug.xml
Created May 7, 2022 20:34 — forked from dlew/themes-debug.xml
With the new theming in AppCompat, a lot of assets are tinted automatically for you via theme attributes. That has often led me to wonder "where the hell did this color come from?" You can replace your normal theme with this debug theme to help figure out the source of that color.
<!-- You can change the parent around to whatever you normally use -->
<style name="DebugColors" parent="Theme.AppCompat">
<!-- System colors -->
<item name="android:windowBackground">@color/__debugWindowBackground</item>
<item name="android:colorPressedHighlight">#FF4400</item>
<item name="android:colorLongPressedHighlight">#FF0044</item>
<item name="android:colorFocusedHighlight">#44FF00</item>
<item name="android:colorActivatedHighlight">#00FF44</item>
@M66B
M66B / notices.json
Last active November 14, 2024 21:05
{
"Reminder":"https://workspaceupdates.googleblog.com/2024/06/improved-syncing-experience-between-google-calendar-and-3p-calendars.html",
"Notices":[
{
"Provider":"",
"Date":"",
"Text":[
"&#x1F1EC;&#x1F1E7; ",
"",
"&#x1F1E9;&#x1F1EA; ",
<p class="box" style="padding: 6px; color: red; width: fit-content;">
November 12: there are currently problems with the Gmail email (IMAP) server,
causing errors like '<em>Connection refused</em>', '<em>Connection reset</em>', '<em>Connection dropped</em>', '<em>Connection timeout</em>', etc.
Google is probably busy fixing this, so please try again later.
See for example <a href="https://news.ycombinator.com/item?id=29197479">here</a>.
</p>
auth_username_format = %n
imap_idle_notify_interval = 29 mins
lda_mailbox_autocreate = yes
mail_location = maildir:~/mail
mail_plugins = " fts fts_lucene"
plugin {
fts = lucene
fts_autoindex = yes
fts_lucene = whitespace_chars=@.
imapsieve_mailbox1_before = file:/etc/mail/imapsieve/report-spam.sieve
pki example.com key "/etc/letsencrypt/live/example.com/privkey.pem"
pki example.com certificate "/etc/letsencrypt/live/example.com/fullchain.pem"
listen on lo mask-source
listen on 1.2.3.4 port 25 tls pki example.com auth-optional hostname example.com
listen on 1.2.3.4 port 465 smtps pki example.com auth hostname example.com mask-source
listen on 1.2.3.4 port 587 tls-require pki example.com auth hostname example.com mask-source
table aliases file:/etc/mail/aliases
table domains file:/etc/mail/domains
@M66B
M66B / ogp.php
Last active November 28, 2018 16:41
WordPress Simple OGP
<?php
/*
Plugin Name: Simple OGP embed
Plugin URI: https://www.faircode.eu/
Description: Simple OGP embed
Version: 0.1
Author: Marcel Bokhorst
Author URI: https://www.faircode.eu/
*/
@M66B
M66B / embed.php
Last active November 28, 2018 16:41
WordPress Google Photos embed handler
<?php
/*
Plugin Name: Google Photos embed handler
Plugin URI: https://www.faircode.eu/
Description: Google photos embed handler
Version: 0.1
Author: Marcel Bokhorst
Author URI: https://www.faircode.eu/
*/
@M66B
M66B / gist:62480affb192fe4ff229
Last active April 23, 2016 14:04
Convert OpenCellIId database to OSM
import csv
#Database: http://opencellid.org/
#OsmAnd Map Creator: http://wiki.openstreetmap.org/wiki/OsmAndMapCreator (-Xmx1792M)
print "<?xml version='1.0' encoding='UTF-8'?>"
print "<osm version='0.5' generator='M66B'>"
#0 1 2 3 4 5 6 7 8 9 10 11 12 13
#radio,mcc,net,area,cell,unit,lon,lat,range,samples,changeable,created,updated,averageSignal
@M66B
M66B / gist:3e976ef1dbe0fe4429f6
Last active November 28, 2018 16:41
fstab: mount samba
sudo apt-get install cifs-utils --no-install-recommends
sudo mkdir -p /media/share
sudo nano /etc/mysmbpass
username=somebody
password=secret
sudo nano /etc/fstab