Skip to content

Instantly share code, notes, and snippets.

View hiyosi's full-sized avatar

Tomoya Usami hiyosi

View GitHub Profile
package cmd
import (
"errors"
"fmt"
"io"
"os"
"github.com/spf13/cobra"
)
var Crawler = require("js-crawler");
new Crawler().configure({depth: 3})
.crawl("http://www.google.com", function onSuccess(page) {
console.log(page.url);
});
{
"name": "sample-js-crawler",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"js-crawler": "^0.3.18"
}
}
FROM node:6-alpine
RUN apk add --no-cache --virtual tar curl bash gnupg \
&& rm -rf /var/cache/apk/*
RUN mkdir -p /opt/sample-js-crawler
WORKDIR /opt/sample-js-crawler
COPY package.json /opt/sample-js-crawler
@hiyosi
hiyosi / init.lua
Created February 14, 2017 02:51
hammer spoon
local function keyCode(key, modifiers)
modifiers = modifiers or {}
return function()
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), true):post()
hs.timer.usleep(1000)
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), false):post()
end
end
local function remapKey(modifiers, key, keyCode)
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab
.tab-close-button {
padding: 0 !important;
margin-top: -1px !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabs-newtab-button
.toolbarbutton-icon {

:method arguments in 'destructuring-bind' macro was bind to nil.

When run the sample code, the following error has occurred.

The value NIL is not of the expected type KEYWORD.

the code that I have run is the following.

7: (NIL #<Unknown Arguments>)
[No Locals]
8: ((:INTERNAL MYWAY.MAPPER::DISPATCH-WITH-RULES DISPATCH) (#<ROUTE #x302001ED83CD> #<ROUTE #x302001ED33AD>))
Locals:
ROUTES = (#<ROUTE #x302001ED83CD> #<ROUTE #x302001ED33AD>)
#:LOOPVAR-9065 = (#<ROUTE #x302001ED33AD>)
ROUTE = #<ROUTE #x302001ED83CD>
ROUTES = (#<ROUTE #x302001ED33AD>)
ALLOW-HEAD = T
URL-STRING = "/"

SCIM 2.0 filter

This package includes 'parser', 'lexer' and 'evaluator'.
Also parser program is generated by goyacc.

Install

go get github.com/hiyosi/scim2/filter