Skip to content

Instantly share code, notes, and snippets.

scraper = require 'scraper'
fs = require 'fs'
########################################################
## Hate typing console.log
log = (msg) -> console.log(msg)
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
NOV-29-2012
Ran into a puzzling issue with AngularJS and Taffy
I have two code examples:
WORKING:
http://plnkr.co/edit/fAgtyq?p=preview
BROKEN
@dearfrankg
dearfrankg / gist:4647782
Created January 27, 2013 10:35
working https
var express = require('express'),
http = require('http'),
https = require('https'),
fs = require('fs');
var app = express();
// Configuration
//
<!doctype html>
<html ng-app="plunker" xmlns:ng="http://angularjs.org" >
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js"></script>
<script src="http://angular-ui.github.com/bootstrap/ui-bootstrap-tpls-0.1.0-SNAPSHOT.js"></script>
<script src="example.js"></script>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
</head>
<body>
<!doctype html>
<html ng-app="plunker" xmlns:ng="http://angularjs.org" >
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js"></script>
<script src="http://angular-ui.github.com/bootstrap/ui-bootstrap-tpls-0.1.0-SNAPSHOT.js"></script>
<script src="example.js"></script>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
<!--[if lte IE 8]>
<!doctype html>
<html ng-app="plunker" xmlns:ng="http://angularjs.org" >
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js"></script>
<script src="http://angular-ui.github.com/bootstrap/ui-bootstrap-tpls-0.1.0-SNAPSHOT.js"></script>
<script src="example.js"></script>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
<!--[if lte IE 8]>
// credit: http://snipplr.com/view.php?codeview&id=56433
//
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET",'favicon.ico',false);
xmlhttp.overrideMimeType('text/plain; charset=x-user-defined');
xmlhttp.send();
var data = '';
for ( var i = 0; i < xmlhttp.responseText.length; i++ ) data += String.fromCharCode( ( xmlhttp.responseText[ i ].charCodeAt(0) & 0xff ) );
// Convert raw data to base64
data = btoa( data );
@dearfrankg
dearfrankg / gist:6531334
Created September 11, 2013 23:43
pouchdb node module test
chai = require 'chai'
chai.should()
PouchDB = require 'pouchdb'
describe "myPouch", ->
db = null
/*
Success when trying to combine css with scss
gulp-if did not work for me.
*/
node --version
v4.1.0
npm cache clean
npm install
npm ls
activator@1.1.0 /Users/frankg/dev/code/test/eval-activator/deitch-activator
├── async@0.2.10