Skip to content

Instantly share code, notes, and snippets.

@dgrammatiko
dgrammatiko / twittermute.txt
Created January 24, 2020 18:30 — forked from IanColdwater/twittermute.txt
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@dgrammatiko
dgrammatiko / example-minified.html
Created January 16, 2020 18:00 — forked from matthewp/example-minified.html
SSR web components
<!doctype html>
<html lang="en">
<title>Web component SSR</title>
<script>
customElements.define("shadow-root",class extends HTMLElement{connectedCallback(){let a=this.parentNode,b=a.firstElementChild;this.remove(),a.attachShadow({mode:"open"}).append(b.content.cloneNode(!0))}});
</script>
<a-component>
<template>
<header>
@dgrammatiko
dgrammatiko / myclass.php
Created August 15, 2019 11:33 — forked from iggyvolz/myclass.php
Demo of PHP Preload
<?php
echo "myclass.php required".PHP_EOL;
class MyClass
{
public function MyFunction():void
{
echo "This is a function!".PHP_EOL;
}
}
root: {
// Solarized colors
--color-base03: #002b36;
--color-base02: #073642;
--color-base01: #586e75;
--color-base00: #657b83;
--color-base0: #839496;
--color-base1: #93a1a1;
--color-base2: #eee8d5;
--color-base3: #fdf6e3;
@dgrammatiko
dgrammatiko / raspi-setup-gitea.md
Last active November 8, 2018 22:26 — forked from afragen/raspi-setup-gitea.md
Installing Gitea on Raspberry Pi 3 b+ with nginx and automatic backups
@dgrammatiko
dgrammatiko / localhost-ssl-certificate.md
Created September 7, 2018 20:50 — forked from ethicka/localhost-ssl-certificate.md
Localhost SSL Certificate on Mac OS Sierra and High Sierra

This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.

Set up localhost.conf

sudo nano /etc/ssl/localhost/localhost.conf

Content:

[req]
@dgrammatiko
dgrammatiko / raspi-setup-gitea.md
Created July 12, 2018 16:28 — forked from mirhec/raspi-setup-gitea.md
Installing Gitea on Raspberry Pi with nginx, SSL and automatic backups

Setup Gitea on Raspberry Pi (3)

These instructions are based on this article: https://www.alexruf.net/2016/05/23/setup-gogs-git-service.html.

Setup Raspberry Pi with minimal Raspbian image. You need to connect to the HDMI port and set the following:

sudo raspi-config

There you need to enable the SSH server and you should change the hostname.

@dgrammatiko
dgrammatiko / chrome.css
Last active December 14, 2020 22:30
Default UA stylesheets
// https://chromium.googlesource.com/chromium/blink/+/master/Source/core/css/html.css
/*
* The default style sheet used to render HTML.
*
* Copyright (C) 2000 Lars Knoll ([email protected])
* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@dgrammatiko
dgrammatiko / get_latest_release.sh
Created May 26, 2018 14:26 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
<!--
https://stackoverflow.com/questions/8917921/cross-browser-javascript-not-jquery-scroll-to-top-animation?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
-->
<p>Very long page.Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Ver