Skip to content

Instantly share code, notes, and snippets.

View zsim0n's full-sized avatar

Zoltan Simon zsim0n

View GitHub Profile
{
"$schemaTransformation" : "http://buzzword.org.uk/2008/jCard/transformation.js" ,
"id" : "jCard" ,
"version" : "0.1.0" ,
"title" : "jCard" ,
"description" : "This document defines the jCard data format for representing and exchanging a variety of information about an individual (e.g., formatted and structured name and delivery addresses, email address, multiple telephone numbers, photograph, logo, audio clips, etc.)." ,
"type" : "object" ,
"seeAlso" :
[
"http://microformats.org/wiki/jcard" ,
@zsim0n
zsim0n / geometry_geojson.yaml
Created April 6, 2018 17:24 — forked from bubbobne/geometry_geojson.yaml
A swagger geojson geometry description
#MIT License
#
#Copyright (c) 2017 Daniele Andreis
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
#
@zsim0n
zsim0n / docker-cleanup.sh
Created February 25, 2017 21:41
Docker cleanup for mac
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker volume rm $(docker volume ls |awk '{print $2}')
rm -rf ~/Library/Containers/com.docker.docker/Data/*
@zsim0n
zsim0n / README.md
Last active February 24, 2017 10:00
Yet another README.md template

Title or something

Motivation goes here

Usage

Quick and dirty instructions for start

Contribution

@zsim0n
zsim0n / Bitbucket-README.md
Last active February 20, 2017 08:10
README.md Templates

README

This README would normally document whatever steps are necessary to get your application up and running.

What is this repository for?

@zsim0n
zsim0n / cogniostore.swift
Created October 21, 2015 22:26
AWSCognito iOS Swift Share Identity between app and extension
// Framework
import Foundation
import AWSCognito //pod
import KeychainAccess //pod
public struct Apple {
public struct KeyChain {
public static let Group = "YOUR GROUP NAME"
public static let Service = "YOUR SERVICE NAME"
@zsim0n
zsim0n / anon.js
Created October 13, 2015 18:26
Instant anonymous function call javascript
// http://stackoverflow.com/questions/8583548/calling-a-javascript-anonymous-function-right-when-its-declared-doesnt-work
var step = (function(){
// this code is executed immediately,
// the return value is assigned to `step`
})();
@zsim0n
zsim0n / aws-promisify.js
Last active April 21, 2018 05:32
Promises - Bluebird - Node
var AWS = require('aws-sdk');
var S3 = Promise.promisifyAll(new AWS.S3());
return S3.putObjectAsync(params);
@zsim0n
zsim0n / base64.swift
Created September 7, 2015 04:45
Convert text to Base64 - Swift
func textFieldShouldReturn(textField: UITextField) -> Bool {
urlField.resignFirstResponder()
let data = urlField.text!.dataUsingEncoding(NSUTF8StringEncoding)
let urlFieldBase64 = data?.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.Encoding64CharacterLineLength)
return false
}
@zsim0n
zsim0n / aws API Gateway unicode workaround base64-util.js
Last active March 24, 2022 15:16
AWS API Gateway UTF-8 (unicode) workaround
// inspiration
// http://timnew.me/blog/2013/01/30/pitfall-in-node-crypto-and-base64-encoding/
// https://github.com/kevva/base64-regex
Base64Util = {
encode64: function(text) {
return new Buffer(text, 'utf8').toString('base64');
},
decode64: function(base64) {
return new Buffer(base64, 'base64').toString('utf8');
},