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
# vzctl create 200 --config unlimited --ostemplate \ | |
> debian-6.0-x86 --ipadd 192.168.202.200 --hostname guest | |
Creating container private area (debian-6.0-x86) | |
Performing postcreate actions | |
CT configuration saved to /etc/vz/conf/200.conf | |
Container private area was created | |
# vzctl start 200 | |
Starting container... | |
Container is mounted | |
Adding IP address(es): 192.168.202.200 |
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
#go to folder: | |
/Applications/Adobe Photoshop CS6/Locales/pt_BR/Support Files/tw10428.dat | |
#rename the file tw10428.dat for tw10428.bak |
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 | |
/* | |
* Copyright 2013 Radoslaw Kamil Ejsmont <[email protected]> | |
* | |
* Original code by mailaneel is available at | |
* https://gist.github.com/mailaneel/1363377 | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. |
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
/* One random row from table "tbl" */ | |
WITH RECURSIVE r AS ( | |
SELECT NULL::int AS id, min(id) AS min_id, max(id) AS max_id, 0 AS cnt | |
FROM tbl | |
UNION ALL | |
SELECT tbl.id, r.min_id, r.max_id, r.cnt + 1 | |
FROM r LEFT JOIN tbl | |
ON tbl.id = (SELECT floor(random() * (r.max_id - r.min_id + 1))::int) | |
WHERE r.id IS NULL | |
) |
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
#Put this in Export-Chocolatey.ps1 file and run it: | |
#.\Export-Chocolatey.ps1 > packages.config | |
#You can install the packages using | |
#choco install packages.config -y | |
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>" | |
Write-Output "<packages>" | |
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" } | |
Write-Output "</packages>" |
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 Example; | |
use Bunny\Channel; | |
use Bunny\Client; | |
use Bunny\Message; | |
use React\Promise\Deferred; | |
use React\Promise\PromiseInterface; | |
require_once __DIR__ . "/vendor/autoload.php"; |
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
'use strict'; | |
var webpack = require('webpack'); | |
var path = require('path'); | |
module.exports = { | |
entry: './src/game.js', | |
output: { | |
filename: 'build/game.js' | |
}, |
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 Acme\Symfony\Form\DataMapper; | |
use Symfony\Component\Form\Exception\TransformationFailedException; | |
use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; | |
use Symfony\Component\PropertyAccess\PropertyAccessorInterface; | |
use Symfony\Component\Serializer\NameConverter\NameConverterInterface; | |
class ConstructorMapper extends PropertyPathMapper | |
{ |
If you are using KnpMenu
> 2.1, you can directly use this feature:
- PR: KnpLabs/KnpMenu#228
- Doc: https://github.com/KnpLabs/KnpMenu/blob/master/doc/02-Twig-Integration.markdown#functions
You can use it like this:
<ol class="breadcrumb">
{% for breadcrumb_item in knp_menu_get_breadcrumbs_array(knp_menu_get_current_item('main')) %}
{% if not loop.last %}
<a href="{{%20breadcrumb_item.uri%20}}">{{ breadcrumb_item.label }}</a>
OlderNewer