Skip to content

Instantly share code, notes, and snippets.

View sventech's full-sized avatar

Sven Pedersen sventech

View GitHub Profile
Verifying my Blockstack ID is secured with the address 1HZ7bp4bKsVtGnqeskWa9zNRLjGmCf2df1 https://explorer.blockstack.org/address/1HZ7bp4bKsVtGnqeskWa9zNRLjGmCf2df1

Keybase proof

I hereby claim:

  • I am sventech on github.
  • I am svenpedersen (https://keybase.io/svenpedersen) on keybase.
  • I have a public key ASDIC_e0g4v6tWtNQUtyJAlqWjLR6AxNtQrgWPjg-qHl5go

To claim this, I am signing this object:

@sventech
sventech / android_instructions.md
Last active May 2, 2017 20:35 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@sventech
sventech / simplecart_parser.clj
Last active June 24, 2016 20:55
Clojure parser for SimpleCart(js) form POST/GET
(ns webstore.simplecart_parser
(:require [clojure.string :as string]))
;; see github.com/sventech/simplecart-js for tax calculation improvement fork
(def input-params
{"item_quantity_1" "1",
"itemCount" "2",
"item_price_1" "9.99",
"store_name" "Online Store",
"item_name_1" "Awesome Product - MP3",
@sventech
sventech / update_location_info_zippopotamus.js
Last active August 29, 2015 14:20
JavaScript update city, region / state location info from https://zippopotam.us free API
// update_inputs = {"city": "#cityInput", "region": "#regionInput", }
window.updatePostalCode = function(country, postal_code, update_inputs) {
jQuery.get("http://api.zippopotam.us/" + country + "/" + postal_code, "",
function( data ) {
var result =
{ "country": data["country"],
"country_code": data["country abbreviation"],
"region": data['places'][0]['state'],
"city": data['places'][0]['place name']};
if("region" in update_inputs && result["region"]) {
@sventech
sventech / php2python.gk
Created October 2, 2014 16:19
Convert PHP to Python (just a rough start to avoid extra typing) -- language is Gherkin Lisp
;;; php2py.gk Ported from php2py.el
;;; Copyright (C) 2006 Aarre Laakso <aarre@pair.com>
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@sventech
sventech / rx.gk
Last active August 29, 2015 14:07
Gherkin Lisp regular expressions ported from GNU Emacs rx.el
;;; rx.gk --- sexp notation for regular expressions
;;; ported from rx.el / GNU Emacs
;; Copyright (C) 2001 Free Software Foundation, Inc.
;; Author: Gerd Moellmann <gerd@gnu.org>
;; Maintainer: FSF
;; Keywords: strings, regexps, extensions
;; This file is part of GNU Emacs.