Skip to content

Instantly share code, notes, and snippets.

#!env sh
# sudo gem install terminal-notifier beforehand.
# Install to /usr/local/bin/alarm
# Usage: alarm phpunit -c app
$@
terminal-notifier -message "Return code: $?" -group "$1" -title $1 > /dev/null
package main
import (
"code.google.com/p/go.net/websocket"
)
type connection struct {
// The websocket connection.
ws *websocket.Conn
<?php
namespace Redacted\Tests;
/**
* @author Marc Weistroff <[email protected]>
*/
class FuckedUpTest extends \PHPUnit_Framework_TestCase
{
public function testThatIsExpected()
packer build packer/template-virgin.json
2013/11/12 11:50:33 Packer Version: 0.3.11
2013/11/12 11:50:33 Packer Target OS/Arch: linux amd64
2013/11/12 11:50:33 Detected home directory from env var: /var/lib/jenkins
2013/11/12 11:50:33 Attempting to open config file: /var/lib/jenkins/.packerconfig
2013/11/12 11:50:33 File doesn't exist, but doesn't need to. Ignoring.
2013/11/12 11:50:33 Packer config: &{PluginMinPort:0 PluginMaxPort:0 Builders:map[amazon-ebs:packer-builder-amazon-ebs amazon-chroot:packer-builder-amazon-chroot amazon-instance:packer-builder-amazon-instance digitalocean:packer-builder-digitalocean openstack:packer-builder-openstack virtualbox:packer-builder-virtualbox vmware:packer-builder-vmware] Commands:map[build:packer-command-build fix:packer-command-fix inspect:packer-command-inspect validate:packer-command-validate] PostProcessors:map[vagrant:packer-post-processor-vagrant] Provisioners:map[ansible-local:packer-provisioner-ansible-local chef-solo:packer-provisioner-chef-solo file:packer-p
packer build packer/template-virgin.json
2013/11/12 12:11:00 Packer Version: 0.4.0 dev f8dbe5246c9ce24f2bef0a2ef92fe78392d331d3
2013/11/12 12:11:00 Packer Target OS/Arch: linux amd64
2013/11/12 12:11:00 Built with Go Version: go1.1.2
2013/11/12 12:11:00 Detected home directory from env var: /var/lib/jenkins
2013/11/12 12:11:00 Attempting to open config file: /var/lib/jenkins/.packerconfig
2013/11/12 12:11:00 File doesn't exist, but doesn't need to. Ignoring.
2013/11/12 12:11:00 Packer config: &{PluginMinPort:0 PluginMaxPort:0 Builders:map[amazon-ebs:packer-builder-amazon-ebs amazon-chroot:packer-builder-amazon-chroot amazon-instance:packer-builder-amazon-instance digitalocean:packer-builder-digitalocean docker:packer-builder-docker openstack:packer-builder-openstack qemu:packer-builder-qemu virtualbox:packer-builder-virtualbox vmware:packer-builder-vmware] Commands:map[build:packer-command-build fix:packer-command-fix inspect:packer-command-inspect validate:packer-command-validate] PostProcessors:map[vagrant:
#!/bin/bash
sudo apt-get install -qy build-essential g++ flex bison gperf ruby perl libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev libpng-dev libjpeg-dev python libx11-dev libxext-dev
sudo apt-get install -qy ttf-mscorefonts-installer
git clone --recurse-submodules git://github.com/ariya/phantomjs.git
cd phantomjs
git checkout 2.0.0
./build.py
sudo mv bin/phantomjs /usr/local/bin/phantomjs
{
"name": "marcw/foo-project",
"license": "proprietary",
"type": "project",
"description": "",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/moprodotio/Sitemap"
}
@marcw
marcw / deploy.sh
Created September 9, 2016 13:52
Symfony deployment bash script
#!/bin/bash
# some configurations values
host="foobar-web00" # the name of the host in my ssh config file
project_path="/var/www/foobar"
user="web"
key_filename="/path/to/.ssh/web-deploy-key"
dry_run="--dry-run"
assets_differ=""
CREATE SEQUENCE seq_aliases_pkid;
CREATE TABLE IF NOT EXISTS aliases (
pkid INT NOT NULL DEFAULT nextval('seq_aliases_pkid'),
mail VARCHAR(120) NOT NULL default '',
destination VARCHAR(120) NOT NULL default '',
enabled BOOLEAN NOT NULL default true,
PRIMARY KEY (pkid)
);
<?php
namespace AudienceHero\Bundle\FileBundle\Action;
use ApiPlatform\Core\Bridge\Symfony\Validator\Exception\ValidationException;
use AudienceHero\Bundle\FileBundle\Entity\File;
use AudienceHero\Bundle\FileBundle\Factory\FileFactory;
use AudienceHero\Bundle\FileBundle\Uploader\UploaderInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;