Skip to content

Instantly share code, notes, and snippets.

@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 (knoll@kde.org)
* 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

Keybase proof

I hereby claim:

  • I am dgrammatiko on github.
  • I am dgrammatiko (https://keybase.io/dgrammatiko) on keybase.
  • I have a public key ASBZiLc6htQmRPSwVoRy1Do01lMMeu8Pkt3yZKCf3CbDaQo

To claim this, I am signing this object:

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array: T[] 🔒 ES3