This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Custom reST_ directive for ditaa_ integration. | |
.. _reST: http://docutils.sourceforge.net/rst.html | |
.. _ditaa: http://ditaa.sourceforge.net/ | |
""" | |
import os | |
import tempfile | |
from zlib import adler32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Commmon | MailUtils | |
apt: pkg=mailutils state=latest | |
- name: Commmon | sqlite3 | |
apt: pkg=sqlite3 state=latest | |
- name: Commmon | libsqlite3-dev | |
apt: pkg=libsqlite3-dev state=latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
root /home/website/web; | |
rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
try_files $uri @rewriteapp; | |
location @rewriteapp { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This gist contains two files for simple indexing of PDF files. | |
== requirements == | |
First you need to install Solr (which requires a Java JDK): Download a tar or zipfile at http://www.apache.org/dyn/closer.cgi/lucene/solr/ and unpack it to a directory of your choice. Go into this directory and start solr running in jetty by: | |
$ cd example | |
$ java -jar start.jar | |
Then locate your browser to http://localhost:8983/solr/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<Data> | |
<Series> | |
<id>83462</id> | |
<Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors> | |
<Airs_DayOfWeek>Monday</Airs_DayOfWeek> | |
<Airs_Time>10:00 PM</Airs_Time> | |
<ContentRating>TV-PG</ContentRating> | |
<FirstAired>2009-03-09</FirstAired> | |
<Genre>|Drama|</Genre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Credit to Adam Presley, who's ftpsyncing fabfile I used as a starting point | |
http://adampresley.com/#!post/2013/04/how-i-deployed-a-php-app-via-ftp-using-fabric-and-git | |
''' | |
import fabric | |
import ftplib | |
import re | |
import os | |
from git import * | |
from ftplib import FTP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is an EXAMPLE gulpfile.js | |
You'll want to change it to match your project. | |
Find plugins at https://npmjs.org/browse/keyword/gulpplugin | |
*/ | |
var gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
gulp.task('scripts', function() { | |
// Minify and copy all JavaScript (except vendor scripts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var del = require('del'); | |
var uglify = require('gulp-uglify'); | |
var gulpif = require('gulp-if'); | |
var exec = require('child_process').exec; | |
var notify = require('gulp-notify'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exercise: Nutrition Facts | |
Create an empty webpage. | |
Download nutrition.xml from https://gist.github.com/3000322 and place in your project folder. | |
Use AJAX via jQuery or JS API to fetch the file into the page. | |
Create a table. For each <food> in the XML file, create a row in the table with the food name and nutritional facts - serving size, calories, carbs. | |
Bonus: Use the tablesorter jQuery plugin to make the table sortable by the nutritional facts. | |
Exercise: Lady Gaga News |
OlderNewer