Skip to content

Instantly share code, notes, and snippets.

amobiz amobiz

Block or report user

Report or block amobiz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@amobiz
amobiz / eslintrc.js
Last active Dec 18, 2015 — forked from caweidmann/eslintrc.js
The "C-Dawg linter" annotation.
View eslintrc.js
/*
**
** kyco.eslintrc
** =============
**
** Based on http://eslint.org/docs/rules/
**
** All rules specified in this file are taken from the URL above. We have
** included every single rule except for rules posted under the "Removed"
** section.
View jdom-tagsoup-xpath-namespace.v2.groovy
import java.io.*
import org.jdom.*
import org.jdom.input.*
import org.jdom.xpath.*
import org.jdom.output.*
import org.xml.sax.*
def xhtml = """<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:myns="http://www.w3.org/1999/xhtml"
View jdom-tagsoup-xpath-namespace-no-default.groovy
import java.io.*
import org.jdom.*
import org.jdom.input.*
import org.jdom.xpath.*
import org.jdom.output.*
import org.xml.sax.*
def xhtml = """<html
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:myns="http://www.w3.org/1999/xhtml"
View jdom-tagsoup-xpath-namespace.groovy
import java.io.*
import org.jdom.*
import org.jdom.input.*
import org.jdom.xpath.*
import org.jdom.output.*
import org.xml.sax.*
def xhtml = """<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:myns="http://www.w3.org/1999/xhtml"
View eval.js
var log = console.log.bind(console);
function eval(expression) {
var tokens, value, resolve;
resolve = resolver();
tokens = parse(expression);
if (evaluate(tokens, resolve)) {
log(expression + '=' + resolve.get());
} else {
View github.ribbon
<script>
//<![CDATA[
/* Add GitHub Ribbons */
(function(options) {
var el, href, pos;
if (location.pathname==='/') {
href = options.home;
}
else {
View blogger-google-code-prettify-github-gist-style.html
<style>
.hentry .gist .gist-file {
margin-bottom: 0;
border: none;
}
.gist, pre.code {
display: block;
overflow: auto;
min-height: 30px;
max-height:800px;
View differential-backup-using-7-zip-windows-7z-bak.cmd
@echo off & goto CONFIG
:SYNTAX
echo Syntax: %~n0 [DIFF|FULL] [folders]
goto END
:CONFIG
set BAK_DIR=[你要儲存備份檔的目錄,不要包含路徑最後的 \ 字元]
View jdom-tagsoup-xpath-namespace-gnews.v2.groovy
import java.io.FileWriter
import org.jdom.*
import org.jdom.input.*
import org.jdom.xpath.*
import org.jdom.output.*
import org.xml.sax.*
def builder = new SAXBuilder( "org.ccil.cowan.tagsoup.Parser" )
builder.setFeature( "http://xml.org/sax/features/namespace-prefixes", true )
builder.setFeature( "http://xml.org/sax/features/namespaces", false )
View jdom-tagsoup-xpath-namespace-Parser.java
public void parse (InputSource input) throws IOException, SAXException {
setup();
Reader r = getReader(input);
theContentHandler.startDocument();
theScanner.resetDocumentLocator(input.getPublicId(), input.getSystemId());
if (theScanner instanceof Locator) {
theContentHandler.setDocumentLocator((Locator)theScanner);
}
// hack start
if (namespaces)
You can’t perform that action at this time.