Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Find Books Related to where you are</title>
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAtsEsZKvTMrabC2Wd7XITJhR_DDkFHwL5BSWO8LemKnbXoiPGUBSIGXXVgNcF9XgCIlUajQ7GxO7c2w"></script>
<script type="text/javascript">
google.load("maps", "3",{"other_params":"sensor=true"});
google.load("jquery", "1.4.4");
@steckel
steckel / bdd_cucumber-js.md
Created February 21, 2012 21:39
Workflow: Behavior Driven Development/Design for Front End Development (JavaScript)

Beyond any other definition, Behavior Driven Development/Design ("BDD") is a philosophy.

What is "BDD"?

"BDD" is a set of tools and techniques that exist to support one idea: good software is written to meet the needs of the stakeholders (typically clients).

These stakeholders know their business better than the people designing the software. It is the responsibility of developers to capture the business requirements and translate them into software.

BDD tools facilitate this as a process by letting developers author features first, which capture requirements in a domain-specific language. Code is developed by working on these high-level features, and then on code specifications.

@mnapoli
mnapoli / behat-reference.feature
Last active February 12, 2024 10:54
Behat Mink reference
# Given
Given I am on [the] homepage
Given I am on "url"
# When
When I go to [the] homepage
When I go to "url"
When I reload the page
@hectorcorrea
hectorcorrea / rdf4rdbms.md
Last active February 18, 2017 22:53
RDF for Relational Database heads
@jakechen
jakechen / spark_s3_dataframe_gdelt.py
Last active October 5, 2021 03:40
Creating PySpark DataFrame from CSV in AWS S3 in EMR
# Example uses GDELT dataset found here: https://aws.amazon.com/public-datasets/gdelt/
# Column headers found here: http://gdeltproject.org/data/lookups/CSV.header.dailyupdates.txt
# Load RDD
lines = sc.textFile("s3://gdelt-open-data/events/2016*") # Loads 73,385,698 records from 2016
# Split lines into columns; change split() argument depending on deliminiter e.g. '\t'
parts = lines.map(lambda l: l.split('\t'))
# Convert RDD into DataFrame
from urllib import urlopen
html = urlopen("http://gdeltproject.org/data/lookups/CSV.header.dailyupdates.txt").read().rstrip()

Libraries in Østfold Kommune

Vendors were provided with a set of questions to which libraries in Østfold kommune wanted answers. I'm trying to answer them here.

What does the library system of the future look like?

To answer this question, we need to ask what do a library systems try to achieve today? Library systems facilitate the aims of the library; most libraries agree that these include:

  • providing access to materials to patrons
  • helping patrons to find materials they are looking for
@ravikiranj
ravikiranj / postman-hmac-sha512-preq-request.js
Created April 27, 2017 18:05
HMAC SHA512 Authentication Pre-request script for Postman
/* Pre-requisite
==================
1) Create an Environment (if you don't already have on) and enable it for your request
2) Add a new Header with key as "Authorization" and value as "{{hmacAuthHeader}}"
3) Add the following Pre-request Script that computes the hmacAuthHeader variable and adds it to the environment
4) Fill your CLIENT_KEY and SECRET_KEY with valid values
*/
function getPath(url) {
var pathRegex = /.+?\:\/\/.+?(\/.+?)(?:#|\?|$)/;
@balintsera
balintsera / lambda-proxy-integration.yml
Last active December 6, 2021 14:54
Lambda Proxy Integration with Cloudformation tamplate
apiGateway:
Type: "AWS::ApiGateway::RestApi"
Properties:
Name: "example-api-gw"
Description: "Example API"
ProxyResource:
Type: "AWS::ApiGateway::Resource"
Properties:
ParentId: !GetAtt apiGateway.RootResourceId
@GuillaumeDerval
GuillaumeDerval / covidScanJWT.py
Created September 21, 2021 14:02 — forked from ixe013/showJWT.py
Python script to decode a JWT. Works with JWT that are compressed (DEFLATE algorihtm) and incomplete padding
from __future__ import print_function
import base64
import json
import os.path
import pprint
import sys
import time
import zlib