Skip to content

Instantly share code, notes, and snippets.

@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
/* WebKit */
-webkit-filter: invert();
/* Firefox */
filter: url("data:image/svg+xml;utf8,<svg height='0' xmlns='http://www.w3.org/2000/svg'><filter id='negative'><feColorMatrix values='-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0'/></filter></svg>#negative");
/* IE 6-7 */
filter: progid:DXImageTransform.Microsoft.BasicImage(invert=1);
/* IE 8 */
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(invert=1)';
@kbond
kbond / AppKernel.php
Last active August 6, 2024 09:05
JWT Authentication With Symfony Guard. POST username/password to /login to receive token, /api* requests require a valid token
<?php
// app/AppKernel.php
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
public function registerBundles()
{
server {
listen 80 default_server;
listen [::]:80 default_server;
root /your/root/path;
index index.html;
server_name website.com;
@HarshadRanganathan
HarshadRanganathan / letsencrypt
Last active March 18, 2021 06:28
Let's Encrypt SSL for Nginx in Amazon Linux AMI instance
# Install wget
yum install wget -y
# Install certbot-auto
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
# Obtain SSL certificate with Nginx plugin for the domain
sudo ./certbot-auto --nginx -d app.com --debug
@TrillCyborg
TrillCyborg / mastodon-docker-setup.md
Last active May 14, 2025 02:50
Mastodon Docker Setup

Mastodon Docker Setup

Setting up

Clone Mastodon's repository.

# Clone mastodon to ~/live directory
git clone https://github.com/tootsuite/mastodon.git live
# Change directory to ~/live

cd ~/live

@spaze
spaze / README-azure-storage-php-patches.md
Last active March 24, 2022 17:45
azure-storage-php composer patches for cweagans/composer-patches
  1. Install composer-patches plugin
composer require cweagans/composer-patches
  1. Download all the files (*.diff & *.json) to patches subdirectory of your project

  2. Add the following to your composer.json:

	"extra": {