Skip to content

Instantly share code, notes, and snippets.

View buzzedword's full-sized avatar
:octocat:
Live and in stereo

Danny Garcia buzzedword

:octocat:
Live and in stereo
View GitHub Profile
@buzzedword
buzzedword / ua.min.js
Created September 11, 2012 21:47
Minified UA library.
/*jslint browser: true, regexp: true, maxerr: 50, indent: 4 *//**
* A UserAgent detection library.
*
* This library relies on the navigator.userAgent property and hence does not
* work for custom UserAgent settings.
*
* Apart from supporting detection of major browser vendors, the library also
* supports detection of various devices.
*
* Copyright (c) 2012, Gopalarathnam Venkatesan
@buzzedword
buzzedword / bower-hitlist.md
Created September 21, 2012 19:55
Making the web a better place: Bower Hitlist

NEW Organization Repo

Please find the new location for the bower hitlist in Github Orgs, rather than Gists. See you there!

https://github.com/bower-hitlist/bower-hitlist.github.com

Overview

Today, I'm starting a small campaign to make the state of the web better in my own way. With the advent of a unified package system like bower, it has never been easier to improve the lives of developers everywhere!

@buzzedword
buzzedword / composer.json
Created October 22, 2012 15:37
symfony 2.1
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": {
"": "src/",
"ACH": "vender/quickbase/quickbase"
}
},
"require": {
<?php
// Stuff to figure out:
// - where should this file live and in what folder structure of /vendor
// - what namespace should this class have
// - how do you autoload this class?
// - how do you use this class within a controller
namespace Quickbase\Quickbase\{foldername};
<?php
// Stuff to figure out:
// - where should this file live and in what folder structure of /vendor
// - what namespace should this class have
// - how do you autoload this class?
// - how do you use this class within a controller
namespace Custom\Bundle\HelloWorldBundle;
@buzzedword
buzzedword / JsonController.php
Last active December 13, 2015 17:19
Using JSONP with FosRestBundle
<?php
namespace Demo\Bundle\Controller;
use FOS\RestBundle\Controller\FOSRestController;
use Symfony\Component\HttpFoundation\JsonResponse; // Helper added in Symfony 2.1 for JSON responses
class JsonController extends FOSRestController
{
public function getJsonAction()
{
$data = array(
$("#submit-btn").on('click', function(event) {
event.preventDefault();
var form, url, data, requests;
form = $("#form");
url = form.attr('action');
data = form.serializeArray();
requests = {
getJsonAction : 'http://url.com' // No query param here. jsonp mode sets it.
assetic:
write_to: %kernel.root_dir%/../web/
filters:
compass:
apply_to: "/\.s[ac]ss$/"
<div class="tabs collapsable clickable sorted">
<ul class="navigation">
<li>Home</li>
<li>Second</li>
<li>Third
<ul class="sub collapsed">
<li>Item 1</li>
<li>Item 2</li>
</ul>
</li>
@buzzedword
buzzedword / composer.json
Created November 7, 2013 20:53
Wordpress 3.7.1 composer install
{
"repositories": [
{
"type": "package",
"package": {
"name": "wordpress",
"type": "webroot",
"version": "3.7.1",
"dist": {
"type": "zip",