Skip to content

Instantly share code, notes, and snippets.

Avatar
🎵
git push it, git push it real good

Eric Barnes ericlbarnes

🎵
git push it, git push it real good
View GitHub Profile
View sendy.nginx
server {
listen 80;
listen [::]:80;
server_name site.com;
root /home/forge/site.com;
# FORGE SSL (DO NOT REMOVE!)
# ssl on;
# ssl_certificate;
# ssl_certificate_key;
@ericlbarnes
ericlbarnes / wordpress.dev
Created Feb 27, 2015
WordPress Homestead Nginx
View wordpress.dev
server {
listen 80;
server_name wordpress.app;
root "/home/vagrant/Code/wordpress";
index index.html index.htm index.php;
charset utf-8;
location / {
@ericlbarnes
ericlbarnes / gistlog.md
Created Feb 19, 2015
Create your own blog with Gistlog
View gistlog.md

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

@ericlbarnes
ericlbarnes / post.md
Created Feb 19, 2015
Use Laravel Blade And AngularJS Together
View post.md

By default AngularJS and Blade conflict with the way variables are called. Both use a double curly bracket {{ var }} syntax. There are a few workarounds such as changing Angular’s or Blade’s delimiters but an easier method is available.

Inside blade prefix Angular echo variables with the at “@“ symbol. Here is an example:

<li ng-repeat="phone in phones | filter:query | orderBy:orderProp">
    <span>@{{phone.name}}</span>
    <p>@{{phone.snippet}}</p>
</li>
View 1995.html
<div class="button">
<a href="#" onClick="doThing()">CLICK ME</a>
<script src="javascript">
function doThing() {
//...
}
</script>
</div>
@ericlbarnes
ericlbarnes / countries.php
Created Jan 26, 2015 — forked from DHS/PHP Countries Array
PHP Array of country names
View countries.php
<?php
return [
"Afghanistan",
"Albania",
"Algeria",
"Andorra",
"Angola",
"Antigua and Barbuda",
"Argentina",
@ericlbarnes
ericlbarnes / .bowerrc
Created Jan 17, 2015
Laravel Elixir With Bootstrap Sass
View .bowerrc
{
"directory": "vendor/bower_components"
}
@ericlbarnes
ericlbarnes / wordress-word-count.php
Created Dec 22, 2014
Count the total words of all posts for the year
View wordress-word-count.php
<?php
$words = 0;
$posts = query_posts([
'posts_per_page' => -1,
'year' => '2014',
]);
foreach ($posts as $post) {
$words += str_word_count($post->post_content);
View wp-config.php
<?php
if (file_exists(dirname(__FILE__) . '/wp-config-local.php')) {
# IMPORTANT: ensure your local config does not include wp-settings.php
require_once(dirname(__FILE__) . '/wp-config-local.php');
} else {
// Don't show deprecations; useful under PHP 5.5
error_reporting(E_ALL ^ E_DEPRECATED);
define('DB_NAME', getenv('DB_NAME') );