Skip to content

Instantly share code, notes, and snippets.

View gnomeontherun's full-sized avatar

Jeremy Wilken gnomeontherun

View GitHub Profile
@gnomeontherun
gnomeontherun / gist:1861808
Created February 19, 2012 03:24
Square One Sample Vision Concept

This is a sample vision concept for Square One. You should include all of the following details. It is recommended that if you want to include code (real or just pseudo code) that you make a separate Gist for each snippet and link to it from here. That will make it easier to comment and provide syntax highlighting for that code (select the language to enable that feature). For this sample Markdown is used to provide some formatting to the content. Make sure you make it a public Gist, or else people will not be able to see it!

Summary

This is a short summary of concept.

Problem

Here you will begin describing the problem that needs to be solved. If you are wanting to add a feature, explain problem your feature will try to solve. If you are pointing out a problem with an existing functionality, describe it here.

@gnomeontherun
gnomeontherun / gist:1873113
Created February 21, 2012 02:31
Square One Update Manifest for 3.0
<?xml version="1.0" encoding="utf-8"?>
<!--
A sample update manifest file for an extension. When requested by the server,
this could be served as JSON and could be translated if available.
-->
<versions> <!-- Root node -->
<name>My Component</name> <!-- The name of the extension -->
<description>Description</description> <!-- Extension description -->
<element>com_component</element>
<type>component</type> <!-- values: file, package, component, module, plugin, library -->
@gnomeontherun
gnomeontherun / manifest.xml
Created March 14, 2012 03:07
Sample Square One Distribution Package
<?xml version="1.0"?>
<extension type="distribution">
<name>Cornerstone</name>
<description>A distribution for Square One with the cornerstone Joomla extensions.</description>
<extensions>
<extension name="Load Module Content Plugin" element="loadmodule" type="plugin" folder="content" version="2.5.0" detailsurl="http://update.squareonecms.org/extensions/plg_content_loadmodule.xml"/>
<extension name="JCE Editor" type="component" element="com_jce" version="2.5.0" detailsurl="https://www.joomlacontenteditor.net/index.php?option=com_updates&amp;view=update&amp;format=xml&amp;id=1" />
<extension name="Akeeba Backup" type="component" element="com_akeeba" version="2.5.0" detailsurl="http://cdn.akeebabackup.com/updates/abcore.xml" />
<extension name="XMap Sitemap" type="component" element="com_xmap" version="2.5.0" detailsurl="pkg_com_xmap-2.2.1.zip" />
</extensions>
@gnomeontherun
gnomeontherun / script.php
Created March 14, 2012 03:18
Square One Distribution Installer Script
<?php
defined('_JEXEC') or die();
class CornerstoneInstallerScript
{
public function preflight($parent)
{
return true;
}
@gnomeontherun
gnomeontherun / gist:3955552
Created October 25, 2012 21:30
Notes about Node.js as I learn

Day 2

  • npm install package --save will auto add to dependencies
  • Use an MVC structure
  • You can have dependencies just for development
  • There are a few higher level frameworks (Tower.js, Geddy, Derby, Locomotive.js) but it seems wise to keep it simple
  • Use an MVC structure
  • The power of node modules cannot be understated. On the other hand it seems best to limit as much as possible to only required modules
  • Get your code clearly organized from the start
  • Use an MVC structure
@gnomeontherun
gnomeontherun / angularjs-interceptor.js
Last active November 4, 2020 06:46
Intercept XHR/Ajax requests with AngularJS http interceptors. This allows you to globally intercept and modify requests and responses. You don't need to declare all of the methods, just the ones you need. Some example uses would be logging errors, adding extra headers, or triggering 'loading' screens. This intercepts ALL requests/responses, so y…
// Intercepting HTTP calls with AngularJS.
angular.module('MyApp', [])
.config(function ($provide, $httpProvider) {
// Intercept http calls.
$provide.factory('MyHttpInterceptor', function ($q) {
return {
// On request success
request: function (config) {
// console.log(config); // Contains the data about the request before it is sent.
@gnomeontherun
gnomeontherun / angular-js-myapp.js
Created August 8, 2013 19:49
Demonstration of AngularJS and how to define a batch of routes without declaring each directly with $routeProvider.
var routes = [
{
url: '/',
params: {
templateUrl: 'views/home.html',
controller: 'HomeCtrl'
}
},
{
url: '/bookmarks',

Keybase proof

I hereby claim:

  • I am gnomeontherun on github.
  • I am gnomeontherun (https://keybase.io/gnomeontherun) on keybase.
  • I have a public key whose fingerprint is 588A 742D B118 43E6 8EC3 4B0F 59F7 9F51 8896 2125

To claim this, I am signing this object:

@gnomeontherun
gnomeontherun / building-angular2-app-typescript.md
Last active September 18, 2015 18:29
Building an Angular 2 App with TypeScript

Learn how to structure and build an Angular 2 app using TypeScript and ES6. Angular 2 comes with some new paradigms and features that make it a powerful tool for today's web.

Using an example driven approach, you'll dig into components and how they encapsulate small pieces of reusable functionality. Get practical training on the Angular 2 architecture, how TypeScript can improve your applications, and how features of ES6 make Angular 2 more approachable and easier to work with.

If you're familiar with Angular 1, this is a chance to see how it differs from Angular 2 and learn about the upgrade path.

@gnomeontherun
gnomeontherun / components-whats-in-a-name.md
Last active September 18, 2015 18:41
Web Components: What's in a name?

The term "component" is overloaded in frontend development. There are Web Components, Angular Components, Ember Components, and React Components. What makes them different? How do these all behave?

Examine the principles behind these various types of components and how they address the concepts of reusability, modularity, and encapsulation. Under the hood, these different approaches often solve the same problems, but there are tradeoffs.

You'll see a set of examples built with Web Components, Angular, Ember, and React that demonstrate how the different approaches work and expose some of the limitations they have.