This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Sonata\Bundle\DemoBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Sonata\Bundle\DemoBundle\Model\MediaPreview; | |
use Symfony\Component\HttpFoundation\Request; | |
class DemoController extends Controller | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zend_extension="/Applications/MAMP/bin/php/php5.3.29/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so" | |
xdebug.coverage_enable=1 | |
xdebug.default_enable=1 | |
xdebug.profiler_enable=1 | |
xdebug.profiler_output_dir="/tmp" | |
xdebug.remote_autostart=1 | |
xdebug.remote_enable=1 | |
xdebug.remote_host=localhost | |
xdebug.remote_port=9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// An invalid domain. | |
// http://emailpie.com/v1/[email protected] | |
{ | |
"didyoumean": null, | |
"errors": [ | |
{ | |
"message": "No MX records found for the domain.", | |
"severity": 7 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple spreadsheet, with first sheet containing form submission repsonses | |
// when the form is submitted: | |
// 1) grab the latest response, | |
// 2) post it to a third party service via an HTTP POST | |
function testWebhook() { | |
var ss = SpreadsheetApp.openById(SPREADSHEET_ID); | |
var form=ss.getSheets()[0]; | |
var lr=form.getLastRow(); | |
var el=form.getRange(lr,2,1,1).getValue(); | |
var t=el; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# remove exited containers: | |
docker ps --filter status=dead --filter status=exited --filter status=created -aq | xargs -r docker rm -v | |
# remove unused images: | |
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi | |
# remove unused volumes: | |
docker volume ls -qf dangling=true | xargs -r docker volume rm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Very fast-coded deduplication utility. It parses standard "Storage Analyzer" report and moves duplicated files to a separate folder. | |
// Requires "npm i csv-parse 'move-file" | |
'use strict'; | |
const path = require('path') | |
const fs = require('fs') | |
const parse = require('csv-parse/lib/sync') | |
const moveFile = require('move-file'); |