Start up a lambda-like docker container:
docker run -i -t -v /tmp:/var/task lambci/lambda:build /bin/bash
Install some dependencies inside the container:
yum install gperf freetype-devel libxml2-devel git libtool -y
easy_install pip
import React from 'react' | |
import { render } from 'react-dom' | |
import { Match, Link, BrowserRouter as Router } from 'react-router' | |
import matchSorter from 'match-sorter' | |
import './styles.css' | |
const API = 'http://localhost:3000' | |
const token = localStorage.booksToken || Math.random().toString() | |
localStorage.booksToken = token |
(ns om.next.spec | |
(:require [cljs.spec :as s] | |
[clojure.test.check :as tc] | |
[clojure.test.check.properties :as tcp])) | |
(s/def ::statics | |
(s/cat | |
:static '#{static} | |
:protocol-name '#{om.next/Ident om.next/IQuery om.next/IQueryParams} | |
:impls (s/* seq?))) |
(ns om.next.spec | |
(:require [cljs.spec :as s])) | |
(s/def ::ident (s/and vector? (s/cat :ident keyword? :value #(not (coll? %))))) | |
(s/def ::join-key (s/or :prop keyword? :ident ::ident)) | |
(s/def ::join (s/and (s/map-of ::join-key ::query) #(= (count %) 1))) | |
(s/def ::union (s/and (s/map-of keyword? ::query) #(> (count %) 1))) | |
(s/def ::param-expr | |
(s/cat :query-expr ::query-expr |
nREPL server started on port 64499 on host 127.0.0.1 - nrepl://127.0.0.1:64499 | |
REPL-y 0.3.1 | |
Clojure 1.7.0-alpha6 | |
Reflection warning, /tmp/form-init8946539659736038022.clj:1:1389 - reference to field ns can't be resolved. | |
Reflection warning, /tmp/form-init8946539659736038022.clj:1:3631 - reference to field name can't be resolved. | |
Docs: (doc function-name-here) | |
(find-doc "part-of-name-here") | |
Source: (source function-name-here) | |
Javadoc: (javadoc java-object-or-class-here) | |
Exit: Control+D or (exit) or (quit) |
var dummySocket = new ReadWriteNetStream();
// Debug
dummySocket.on('data', function(data){
console.log('write received', data);
});
dummySocket.write('hey !');
var ipp = require('ipp'); //get it from there - https://npmjs.org/package/ipp - $npm install ipp | |
var request = require('request'); //get it from there - https://npmjs.org/package/request - $npm install request | |
var fs = require('fs'); | |
function getPrinterUrls(callback) { | |
var CUPSurl = 'http://localhost:631/printers';//todo - change of you have CUPS running on other host | |
request(CUPSurl, function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
var printersMatches = body.match(/<TR><TD><A HREF="\/printers\/([a-zA-Z0-9-^"]+)">/gm);//i know, this is terrible, sorry( | |
var printersUrls = []; |
(ns people | |
(:use [clojure.string :only (join)] | |
[clojure.pprint :only (pprint simple-dispatch)])) | |
;; we can make maps using the special literal form: | |
{:a 100 | |
:b 200} | |
(class {:a 100 :b 200}) |