CLICK ME
yes, even hidden code blocks!
print("hello world!")
# 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: |
{ | |
"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393215}", | |
"initialRows": 30, | |
"initialCols": 120, | |
"alwaysShowTabs": true, | |
"showTerminalTitleInTitlebar": true, | |
"experimental_showTabsInTitlebar": true, | |
"requestedTheme": "dark", | |
"profiles": [ | |
{ |
<?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( |
#!/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 }" |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// 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
<?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 |
<?php | |
/** | |
* Remove whitespace at the start of each line. | |
* | |
* Based on Twig's Twig_TokenParser_Spaceless class | |
*/ | |
class TwigIndentlessTokenParser extends Twig_TokenParser | |
{ | |
/** |
#!/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. |