Skip to content

Instantly share code, notes, and snippets.

View Nemo64's full-sized avatar

Marco Pfeiffer Nemo64

View GitHub Profile
@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.
@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;
@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
@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"
@Azuritul
Azuritul / .gitignore
Last active October 25, 2022 20:16
General gitignore file sample
# IDEA Ignores #
################
*.iml
*.ipr
*.iws
.idea/
out/
local.properties
# Generic Android ignores #
@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));
@PVince81
PVince81 / webdav-vs-rest.md
Last active July 30, 2023 16:05
Webdav vs REST
Operation Webdav REST
@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();
};
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">