Skip to content

Instantly share code, notes, and snippets.

View pmanijak's full-sized avatar
📷
oh no

Philip Manijak pmanijak

📷
oh no
  • Olympia, Washington
View GitHub Profile
@pmanijak
pmanijak / header-footer.js
Created August 20, 2012 00:53
Header-footer includes plus active navbar with jQuery
@pmanijak
pmanijak / angular-invalid.js
Created August 28, 2012 07:22
Validation on blur with AngularJS
// Make a custom "invalid" class that goes away
// when an element is focused.
var setupValidation = function(selector) {
$(selector).blur(function() {
var elm = $(this);
if (isInvalid(elm)) {
elm.addClass("invalid");
}
});
@pmanijak
pmanijak / include.html
Created September 1, 2012 19:55
Minimal template example with AngularJS
:-)
@pmanijak
pmanijak / index.html
Created September 2, 2012 05:58
Service and template example with AngularJS for sharing data between controllers
<!doctype html>
<html ng-app="project">
<head>
<title>Angular: Service and template example</title>
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<script src="script.js"></script>
</head>
<body>
<div ng-view></div>
</body>
@pmanijak
pmanijak / index.html
Created September 2, 2012 06:42
Service example with AngularJS for sharing scope data between controllers
<!doctype html>
<html ng-app="project">
<head>
<title>Angular: Service example</title>
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<script>
var projectModule = angular.module('project',[]);
projectModule.factory('theService', function() {
return {
@pmanijak
pmanijak / gist:4172623
Created November 29, 2012 23:25
Installing mod_mono on OS X
This is one way to get mod_mono up with OS X (Lion), for experienced computer users,
but inexperienced Apache users. Note, this is just if you're trying to get one project
up and running quickly:
1. Apache is already installed. Don't worry about it.
2. Get mono for OS X: http://www.go-mono.com/mono-downloads/ (the SDK)
3. Get the latest source for mono_mod: http://download.mono-project.com/sources/mod_mono/
Extract the tar ball, go into the folder, and do this:
$ ./configure prefix=/Library/Frameworks/Mono.framework/Versions/2.10.9 --with-apxs=/usr/sbin/apxs --with-apr-config=/usr/bin/apr-1-config
@pmanijak
pmanijak / gist:4194272
Created December 3, 2012 11:19
Route Apache folder to NodeJS instance
# Apache:
# Set up http://mydomain.com/data to route to NodeJS at port 3000 on the same machine.
#
# Do this in your .conf file:
<Location /data>
ProxyPassReverse http://localhost:3000/data
ProxyPass http://localhost:3000/data
</Location>
@pmanijak
pmanijak / iisnode with express web.config file
Last active December 19, 2015 08:29
iisnode with express web.config file
:-)
@pmanijak
pmanijak / CouchDB return HTTP 304 for attachments
Last active December 19, 2015 18:09
Get CouchDB to return HTTP 304 when getting attachments, using Express and Nano on Node.js.
:-)
@pmanijak
pmanijak / .Git-aware prompt
Last active December 20, 2015 08:39
git prompt setup
# Instructions: https://github.com/jimeh/git-aware-prompt
# Also see: http://www.ibm.com/developerworks/linux/library/l-tip-prompt/