This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"flag" | |
"fmt" | |
"net" | |
"strconv" | |
"strings" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns example.errors) | |
(defn clean-address [params] | |
"Ensure (params :address) is present" | |
(if (empty? (params :address)) | |
[nil "Please enter your address"] | |
[params nil])) | |
(defn clean-email [params] | |
"Ensure (params :email) matches *@*.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONSTRUCT { | |
?person <armillaria://internal/displayLabel> ?label | |
} | |
WHERE { | |
?person a foaf:Person ; | |
foaf:name ?name . | |
OPTIONAL { ?person <http://data.deichman.no/lifespan> ?lifespan } | |
BIND( IF(bound(?lifespan), concat(?name, " (", ?lifespan, ")"), ?name) AS ?label) | |
} LIMIT 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
PREFIX skos: <http://www.w3.org/2008/05/skos#> | |
PREFIX lvont: <http://lexvo.org/ontology#> | |
PREFIX armillaria: <armillaria://internal/> | |
CONSTRUCT { | |
?script a lvont:Script ; | |
rdfs:label ?nb ; | |
rdfs:label ?en ; | |
armillaria:displayLabel ?dLabel ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "FROM busybox" > Dockerfile | |
echo 'VOLUME ["/data"]' >> Dockerfile | |
docker build -t data_image . | |
docker run --name data_volume data_image | |
docker run -d --name k1 --volumes-from=data_volume busybox sh -c 'echo "hei" > /data/hilsen.txt; sleep 60' | |
docker run -d --name k2 --volumes-from=data_volume busybox sh -c 'echo "yo!" >> /data/hilsen.txt; sleep 60' | |
docker run --rm --volumes-from=data_volume busybox cat /data/hilsen.txt | |
> hei | |
> yo! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: start | |
git: | |
if [ ! -d "wp-review-publish" ]; then \ | |
git clone https://github.com/digibib/wp-review-publish ;\ | |
fi | |
build: git | |
docker inspect wp-mysql > /dev/null 2>&1;\ | |
if [ $$? -eq 1 ] ; then \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This scripts scans the elasticsearch source code for all the registered REST endpoints | |
# It will put the formatted output in $DEFINITIONOUTPUTFILE | |
# [MethodName] [HttpVerb] [Route] | |
ESFOLDER="../elasticsearch" | |
DEFINITIONOUTPUTFILE="src/Generated/rest-actions.txt" | |
# Find all the lines that registerHandlers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
num=$1 | |
if [[ -z $num ]] ; then | |
num=1 | |
fi | |
benchmarks=$2 | |
if [[ -z $benchmarks ]] ; then | |
benchmarks="." | |
fi | |
git checkout "HEAD~${num}" > /dev/null 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Domenico Carbotta</string> | |
<key>name</key> | |
<string>IDLE</string> | |
<key>semanticClass</key> | |
<string>theme.light.idle</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>hei</title> | |
<style type="text/css"> | |
body { margin: 40px auto; max-width: 650px; line-height: 1.6; font-size: 18px; color: #222; padding: 0 10px } | |
h1, h2, h3 { line-height: 1.2} | |
</style> |
OlderNewer