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
{% for post in posts %} | |
<div class="blog_post"> | |
<div class="blog_col"> | |
<a class="post_title_cell post_title" href="{{ url('node/' ~ post.nid) }}"> | |
<h3>{{ post.title }}</h3> | |
<div class="comments">0 Comments</div> | |
</a> | |
<div class="cell_180x135 meta"> | |
<h4>{{ post.date |date('M m, Y')}}</h4> |
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 Studiobanks; | |
class Fields | |
{ | |
public static function createEntity() { | |
// $field = entity_create('field_entity', [ | |
// 'id' => 'field_text_slug', | |
// 'name' => 'field_text_slug', | |
// 'entity_type' => 'node', | |
// 'type' => 'text', |
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 Drupal\blog\Controller; | |
use Symfony\Component\HttpFoundation\Response; | |
use Drupal\Core\Controller\ControllerBase; | |
/** | |
* Controller class for the blog module. |
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 | |
// Case 1 Produces: | |
// int_of_value: 0 is equal to value: dog | |
$value = 'dog'; | |
$int_of_value = (int) $value; | |
if ($int_of_value == $value) { | |
/* |
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/sh | |
tar cvpzf ./test_backup.tar.gz --newer-mtime='-3 days' --exclude='.git' ./Sites/* |
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
pgrep 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
pkill -u username 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
nohup some_command > dev/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
#http://stackoverflow.com/questions/7362709/git-pull-fails-with-bad-pack-header-error | |
git config --global pack.windowMemory "100m" | |
git config --global pack.SizeLimit "100m" | |
git config --global pack.threads "1" |
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
find $(brew --prefix)/Library/Formula -type l -name "*requirement.rb" -delete |
NewerOlder