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
<div id="page" class="box stacked"> | |
<div class="primary toolbar">Toolbar</div> | |
<div class="box flex"> | |
<div class="primary sidebar"> | |
Width: | |
<button onclick="$(this).parent().width('+=100');">Increase</button> | |
<button onclick="$parent = $(this).parent(); if($parent.width() >= 200) { $parent.width('-=100') } ;">Decrease</button> | |
</div> | |
<div class="box stacked flex"> | |
<div class="secondary toolbar"> |
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 | |
$EE = get_instance(); | |
$limit = $EE->input->get('show-all') ? 100 : 3; | |
?> | |
{exp:channel:entries limit="<?php print($limit); ?>"}{/exp:channel:entries} |
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
mkdir ~/Desktop/ssl | |
cd ~/Desktop/ssl | |
openssl genrsa -des3 -out server.key 1024 | |
openssl req -new -key server.key -out server.csr | |
cp server.key server.key.org | |
openssl rsa -in server.key.org -out server.key | |
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt | |
sudo cp server.crt /private/etc/apache2/server.crt | |
sudo cp server.key /private/etc/apache2/server.key |
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
case ('admin' === $requestScopeDiscriminator) : | |
// Set default options for form control | |
$options = array( | |
'label' => 'Department', | |
'class' => 'MlfAppBundle:VenueDepartment', | |
'multiple' => true, | |
'endpointIndex' => array( | |
'mlf_back_end_venueDepartment_index', | |
array( |
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 | |
$includeEndTime = true; | |
$interval = \DateInterval::createFromDateString('last day of next month'); | |
$start = new \DateTime("last day of January 2000"); | |
$end = new \DateTime("last day of December 2001"); | |
if(true === $includeEndTime) { | |
$end->add($interval); | |
} |
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 Nsm\Bundle\ApiBundle\Entity; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\ORM\Mapping as ORM; | |
use Hateoas\Configuration\Annotation as Hateoas; | |
use JMS\Serializer\Annotation as Serializer; | |
use Knp\DoctrineBehaviors\Model as ORMBehaviors; |
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
{exp:nsm_category_heading | |
cat_url_title="{segment_2}" | |
channel="news" | |
} | |
{if no_results}{redirect="404"}{/if} | |
{if not_ajax} | |
{embed="site/_header" | |
title="{category_name_path}" | |
description="{category_description}" |
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
var net = require('net'); | |
connection = net.connect(23, '192.168.2.5') | |
connection.setEncoding('utf8'); | |
connection.on('connect', function(){ | |
console.log('connected'); | |
connection.on('data', function(data){ | |
console.log(data); | |
}); |
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
{% macro form_fields(form) %} | |
{% for field in form %} | |
{% if field.vars.block_prefixes[0] != 'button' %} | |
{{ form_row(field) }} | |
{% endif %} | |
{% endfor %} | |
{% endmacro %} | |
{% import _self as macros %} |
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
# Ask for the administrator password upfront | |
sudo -v | |
mkdir -p /Volumes/Sites/Work/Clients | |
mkdir -p /Volumes/Sites/Work/Internal | |
mkdir -p /Volumes/Sites/Personal | |
mkdir -p ~/Downloads/Torrents | |
xcode-select --install |