Skip to content

Instantly share code, notes, and snippets.

View josedigital's full-sized avatar

alex rodriguez josedigital

View GitHub Profile
@josedigital
josedigital / gh-pages-deploy.md
Created June 16, 2016 16:49 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@josedigital
josedigital / gulpfile.js
Created April 26, 2016 20:21 — forked from montanaflynn/gulpfile.js
Jade / Stylus Gulpfile with an express static server and livereload enabled.
var sources, destinations, lr, gulp, gutil, jade, stylus;
gulp = require('gulp');
jade = require('gulp-jade');
gutil = require('gulp-util');
stylus = require('gulp-stylus');
sources = {
jade: "jade/**/*.jade",
stylus: "stylus/**/*.stylus",
@josedigital
josedigital / jquery.alterclass.js
Created September 24, 2015 03:03 — forked from peteboere/jquery.alterclass.js
jQuery alterClass plugin: Remove element classes with wildcard matching. Optionally add classes.
/**
* jQuery alterClass plugin
*
* Remove element classes with wildcard matching. Optionally add classes:
* $( '#foo' ).alterClass( 'foo-* bar-*', 'foobar' )
*
* Copyright (c) 2011 Pete Boere (the-echoplex.net)
* Free under terms of the MIT license: http://www.opensource.org/licenses/mit-license.php
*
*/
<?php
/**
* Front-end upload form example
* using ProcessWire Inputfields
*/
$sent = false;
$upload_path = $config->paths->assets . "files/.tmp_uploads/";
<?php
/**
* Front-end upload form example
* using ProcessWire Inputfields
*/
$sent = false;
$upload_path = $config->paths->assets . "files/.tmp_uploads/";
<?php
$out = '';
// create a new form field (also field wrapper)
$form = $modules->get("InputfieldForm");
$form->action = "./";
$form->method = "post";
$form->attr("id+name",'subscribe-form');
@josedigital
josedigital / ShibbolethLogin.module
Created July 25, 2012 18:06
Login Module Shibboleth
<?php
/**
* ProcessWire Module Template
*
* Demonstrates the Module interface and how to add hooks.
*
* ProcessWire 2.x
* Copyright (C) 2010 by Ryan Cramer
* Licensed under GNU/GPL v2, see LICENSE.TXT
@josedigital
josedigital / ModuleName.module
Created July 25, 2012 18:05 — forked from somatonic/ModuleName.module
ProcessWire Module Template
<?php
/**
* ProcessWire Module Template
*
* Demonstrates the Module interface and how to add hooks.
*
* ProcessWire 2.x
* Copyright (C) 2010 by Ryan Cramer
* Licensed under GNU/GPL v2, see LICENSE.TXT