Skip to content

Instantly share code, notes, and snippets.

View Nemo64's full-sized avatar

Marco Pfeiffer Nemo64

View GitHub Profile
@djs55
djs55 / docker-desktop-mutagen-builds.md
Last active July 25, 2020 13:30
Development builds containing the Docker Desktop + Mutagen integration

This is a list of Docker Desktop for Mac development builds which contain mutagen. These are based on Edge, but may contain unexpected bugs. They should be used for testing the Mutagen feature rather than for production work.

2020-07-14: development snapshot: https://desktop-stage.docker.com/mac/edge/46638/Docker.dmg

  • Exclude files from a mutagen sync based on the .dockerignore file.
  • Flush around docker exec as well as docker run for more reliable scripting.
  • Fix a bug which could result in duplicates in the list of synchronised directories.
  • Allow the sync to be bypassed by using :consistent or :cached. In particular this means if you want the previous :delegated behaviour before mutagen, switch to :cached. This
@nblackburn
nblackburn / camelToKebab.js
Last active December 15, 2023 03:19
Convert a string from camel case to kebab case.
module.exports = (string) => {
return string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();
};
@BretFisher
BretFisher / docker-for-mac.md
Last active April 26, 2024 09:38
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@PVince81
PVince81 / webdav-vs-rest.md
Last active July 30, 2023 16:05
Webdav vs REST
Operation Webdav REST
@azhararmar
azhararmar / Symfony - Manual User Authentication
Last active June 16, 2023 15:35
Manually Authenticate User In Symfony
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
// Manually authenticate user in controller
$token = new UsernamePasswordToken($user, null, 'main', $user->getRoles());
$this->get('security.token_storage')->setToken($token);
$this->get('session')->set('_security_main', serialize($token));
@klauspost
klauspost / dictionary-sorted.txt
Last active February 13, 2024 02:27
Brotli dictionary - printed escaped
" </div>"
" })();\r\n"
" && "
" &amp; "
" &nbsp;"
" ''The "
" (&quot;"
" (199"
" (200"
" (e.g."
@tentacode
tentacode / GroupConcat.php
Created June 11, 2014 12:10
Adding MySQL GROUP_CONCAT to doctrine in a Symfony project
<?php
// src/Tentacode/LolcatBundle/Doctrine/Mysql/GroupConcat.php
namespace Tentacode\LolcatBundle\Doctrine\Mysql;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\SqlWalker;
use Doctrine\ORM\Query\Parser;
@chales
chales / mysql-search.sql
Last active July 24, 2018 17:39
Procedure to search through all databases, tables and columns in MySQL DB Server.
# Search through all databases, tables, and columns in a MySQL db.
# From http://kedar.nitty-witty.com/blog/search-through-all-databases-tables-columns-in-mysql
## Table for storing resultant output
CREATE TABLE `temp_details` (
`t_schema` varchar(45) NOT NULL,
`t_table` varchar(45) NOT NULL,
`t_field` varchar(45) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@bramus
bramus / vimeothumb.php
Created January 22, 2014 08:45
Vimeo Thumbnail Script - Gets the poster frame for a Vimeo video id.
<?php
/**
* Vimeo Thumbnail Script - Gets the poster frame for a Vimeo video id.
* @author Bramus Van Damme <bramus@bram.us>
*
* Example Request: vimeothumb.php?id=83936766
*/
// Perform a GET request to a given URL.
@istepanov
istepanov / gist:3950977
Created October 25, 2012 07:00
Remove PHPStorm settings from Mac OS X 10.8 Mountain Lion
#!/usr/bin/sh
rm -rf "$HOME/Library/Preferences/WebIde40"
rm -rf "$HOME/Library/Caches/WebIde40"
rm -rf "$HOME/Library/Application Support/WebIde40"
rm -rf "$HOME/Library/Logs/WebIde40"