Skip to content

Instantly share code, notes, and snippets.

View kristofer's full-sized avatar

Kristofer kristofer

View GitHub Profile
@kristofer
kristofer / pythonmath.py
Created July 17, 2013 15:22
A simple float versus integer example.
# python math
# at a terminal prompt, type: python pythonmath.py
# on either the Pi or a Mac.
print "Integer: 9 / 5 is", 9 / 5
print "Float: 9.0 / 5.0 is", 9.0 / 5.0
print "Integer: 2 / 3 is", 2 / 3
print "Float: 2.0 / 3.0 is", 2.0 / 3.0
@kristofer
kristofer / gist:560ba94600351f47a495
Last active July 28, 2020 19:31
iOS Share Extension NSPredicate trick
//After way, way, way too much trial and error, I finally found a way to create the Share Extension for documents that I was seeking.
// It's not obvious what the NSPredicate should be, but then harder was a lack of example of how to actually use the predicate
// within the Info.plist file of an iOS (8.2+) share extension
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>SUBQUERY (
Verifying that +kristofer is my blockchain ID. https://onename.com/kristofer
@kristofer
kristofer / KeychainPasscodeRepository.swift
Created August 3, 2016 11:55
KeychainPasscodeRepository - a simple example of a ios keychain based repository for https://github.com/yankodimitrov/SwiftPasscodeLock
//
// KeychainPasscodeRepository.swift
// PasscodeLock
// a simple example of a keychain based repository
// https://github.com/yankodimitrov/SwiftPasscodeLock
// uses this fine work for easy access to Keychain
// https://cocoapods.org/pods/KeychainAccess
// written by https://github.com/kristofer

Keybase proof

I hereby claim:

  • I am kristofer on github.
  • I am kryounger (https://keybase.io/kryounger) on keybase.
  • I have a public key ASCw6hmiJJrNxHlHcEPrwWHyDNRjXYOpw5e9i6V-ZGBIXgo

To claim this, I am signing this object:

package main
import (
"fmt"
)
const (
string1 = "aab"
string2 = "aba"
string3 = "cab"
import java.util.Hashtable;
import java.util.Set;
public class Anagram {
static String string1 = "aab";
static String string2 = "aba";
static String string3 = "cab";
static String string4 = "kjfdhskdhfksdhk";