Skip to content

Instantly share code, notes, and snippets.

View jbalthis's full-sized avatar
:octocat:
coding

Jason Balthis jbalthis

:octocat:
coding
View GitHub Profile
/**
* Example gulpfile.js
*/
'use strict';
// THIS CHECK SHOULD BE THE FIRST THING IN THIS FILE
// This is to ensure that we catch env issues before we error while requiring other dependencies.
const engines = require('./package.json').engines;
@jbalthis
jbalthis / GitHub-Project-Guidelines.md
Created May 21, 2023 10:46 — forked from rsp/GitHub-Project-Guidelines.md
Git Strict Flow and GitHub Project Guidelines - setup rules and git flow for commercial and open-source projects by @rsp

Git Strict Flow and GitHub Project Guidelines

Or how to turn this:

into this:

#!/usr/bin/env node
// the pathname of the url without the leading '/' is used as softoken pin
// so make the call with http://localhost:8000/<softoken-pin>
const https = require('https'),
fs = require("fs"),
url = require('url'),
exec = require('child_process').exec;
@jbalthis
jbalthis / footer.ajax.ex.html.twig
Created April 30, 2014 21:10
Example AJAX call via jQuery and a Twig template and using a GET request
@jbalthis
jbalthis / create.ex.php
Created April 30, 2014 21:03
Taking a GET req into a method and persisting a new obj to a db using the Doctrine ORM and annotations in PHP
<?php
/*
* Example of taking a GET req into a method and persisting a new obj to a db
* using the Doctrine ORM and annotations in PHP
*/
// ... ... ...
// Controller class declaration and misc logic
// ... ... ...
@jbalthis
jbalthis / showAction.php
Last active August 29, 2015 14:00
Php method illustrating how to retrieve and pass data to be rendered
<?php
/*
* An example method with Symfony2 style routing config'd via annotation
* Illustrating how to use either a supplied param or a GET request key:value
* To retrieve and pass data to be rendered
*/
// ... ... ...
// Controller class declaration and other logic
// ... ... ...
<?php
/**
* An example Symfony2 Entity that uses annotation for the ORM mapping config
*
*/
namespace Jbalthis\ExampleBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
@jbalthis
jbalthis / config.yml
Created April 30, 2014 20:03
Example Symfony2 base config that shows how to import external resources
# ===================================================================
# Example Symfony2 base config in .yml
# Illustrates how to include external .yml config files
# Various commonly used bundles
#
# app/config/config.yml - Base Framework Configuration
# ===================================================================
# ===== imports =====
imports:
@jbalthis
jbalthis / head.html.twig
Created April 30, 2014 19:58
An example of including external css stylesheets as well as local styles in a Twig template
{# An example of including external css stylesheets as well as local styles in a Twig template #}
{# Incorporates bootstrap, jquery, and jquery-ui stylesheets #}
{# Also illustrates how to have a dynamic title inserted into each page by Twig #}
<head>
{% block head %}
<meta charset="UTF-8" />
{% block head_style %}
{% stylesheets
@jbalthis
jbalthis / footerjs.html.twig
Created April 30, 2014 19:47
An example of how to include JavaScript in a Twig template
{# An example of how to include JavaScript in a Twig template #}
{# This example includes yuicompression, as well jquery, jquery-ui, and bootstrap integration #}
{# Also includes an inline js example and is perfectly suited for assetic management #}
{# BEGIN CODE #}
{% block footer_scripts %}
{% javascripts
'js/jquery.js'