Skip to content

Instantly share code, notes, and snippets.

View strawburrypokki's full-sized avatar

StrawburryPokki strawburrypokki

View GitHub Profile
@jamietre
jamietre / docker-compose.yml
Last active March 17, 2024 23:11
Script to start WSL and bind localhost to WSL IP
# Example docker-compose.yml for plex.
version: "2"
services:
plex:
image: plexinc/pms-docker:plexpass
runtime: nvidia
container_name: "plex"
restart: always
hostname: "MY-PLEX"
volumes:
@shanselman
shanselman / profile.json
Created May 7, 2019 04:22
Windows Terminal Profile
{
"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393215}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"experimental_showTabsInTitlebar": true,
"requestedTheme": "dark",
"profiles": [
{
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@rmpel
rmpel / apache_request_headers.php
Last active June 11, 2022 09:30
apache_request_headers drop-in function for PHP as FPM
<?php
// Drop-in replacement for apache_request_headers() when it's not available
if ( ! function_exists( 'apache_request_headers' ) ) {
function apache_request_headers() {
static $arrHttpHeaders;
if ( ! $arrHttpHeaders ) {
// Based on: http://www.iana.org/assignments/message-headers/message-headers.xml#perm-headers
$arrCasedHeaders = array(
@JonasGroeger
JonasGroeger / sync-projects
Last active November 4, 2023 13:10
Gitlab: Clone / Pull all projects in a group
#!/usr/bin/env bash
# Documentation
# https://docs.gitlab.com/ce/api/projects.html#list-projects
NAMESPACE="YOUR_NAMESPACE"
BASE_PATH="https://gitlab.example.com/"
PROJECT_SEARCH_PARAM=""
PROJECT_SELECTION="select(.namespace.name == \"$NAMESPACE\")"
PROJECT_PROJECTION="{ "path": .path, "git": .ssh_url_to_repo }"
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@fsevestre
fsevestre / BooleanType.php
Last active December 26, 2018 16:15
Boolean form type for Symfony2 + tests (library: https://github.com/fsevestre/BooleanFormType)
<?php
namespace AppBundle\Form\Type;
use AppBundle\Form\DataTransformer\BooleanTypeToBooleanTransformer;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class BooleanType extends AbstractType
@seamusleahy
seamusleahy / twig-indentless.php
Last active April 16, 2018 14:05
Twig tag to remove indentation at the start of each line: {% indentless %}...{%endindetless %}
<?php
/**
* Remove whitespace at the start of each line.
*
* Based on Twig's Twig_TokenParser_Spaceless class
*/
class TwigIndentlessTokenParser extends Twig_TokenParser
{
/**
@lmakarov
lmakarov / install-docker-compose.sh
Created June 30, 2015 16:47
Install docker-compose in boot2docker 1.7.0+
#!/bin.sh
DOCKER_COMPOSE_VERSION=1.3.0
# Download docker-compose to the permanent storage
echo 'Downloading docker-compose to the permanent VM storage...'
sudo mkdir -p /var/lib/boot2docker/bin
sudo curl -sL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /var/lib/boot2docker/bin/docker-compose
sudo chmod +x /var/lib/boot2docker/bin/docker-compose
sudo ln -sf /var/lib/boot2docker/bin/docker-compose /usr/local/bin/docker-compose
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.