EPS to SVG using Inkscape 
Author: Josef Jezek
# Install Inkscape on Ubuntu
sudo apt-get install inkscape
<?php | |
/* Here is some generic error handling code, not related to actual sample */ | |
set_error_handler('my_error_handler'); | |
set_exception_handler('my_exception_handler'); | |
function my_exception_handler($e) { | |
exit('Houston! We have a problem: <br />'.$e); | |
} |
/** | |
* Proof of concept of streaming a file through zlib and into s3, | |
* without storing the entire file in memory. knox-mpu provides support | |
* for Amazon's multipart upload, which allows us to stream an arbitrary | |
* amount of data without specifying the content-length ahead of time. | |
*/ | |
var knox = require('knox'), | |
fs = require('fs'), | |
zlib = require('zlib'), | |
MultiPartUpload = require('knox-mpu'); |
#!/usr/bin/env bash | |
# checks if branch has something pending | |
function parse_git_dirty() { | |
git diff --quiet --ignore-submodules HEAD 2>/dev/null; [ $? -eq 1 ] && echo "*" | |
} | |
# gets the current git branch | |
function parse_git_branch() { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/" |
Author: Josef Jezek
# Install Inkscape on Ubuntu
sudo apt-get install inkscape
define(['angular', 'services'], function (angular) { | |
'use strict'; | |
return angular.module('myApp.controllers', ['myApp.services']) | |
.controller('IndexCtrl', ['$scope', 'googleService', function ($scope, googleService) { | |
$scope.login = function () { | |
googleService.login().then(function (data) { | |
// do something with returned data | |
console.log(data.email); |
// context | |
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://...'); | |
/** | |
* Generates Mongoose uniqueness validator | |
* | |
* @param string modelName | |
* @param string field | |
* @param boolean caseSensitive |
license: mit |
USE DBNAME_LOCAL; | |
UPDATE wp_EXT_options SET option_value="http://LOCALURL:8888" WHERE option_name="siteurl"; | |
UPDATE wp_EXT_options SET option_value="http://LOCALURL:8888" WHERE option_name="home"; |
var forward = require('./middleware/forward.js'); //reverse proxy | |
var nano = require('connect-nano'); | |
// instantiate `app` et al | |
//After app.use(express.cookieParser()); | |
app.use(nano('https://username.cloudant.com')), | |
app.use(forward(/\/db\/(.*)/)); |
// Copyright 2012 Google Inc. All Rights Reserved. | |
/* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |