Skip to content

Instantly share code, notes, and snippets.

Avatar

Kristofer kristofer

View GitHub Profile
View Anagram.java
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";
View anagram.go
package main
import (
"fmt"
)
const (
string1 = "aab"
string2 = "aba"
string3 = "cab"
View keybase.md

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:

@kristofer
kristofer / KeychainPasscodeRepository.swift
Created Aug 3, 2016
KeychainPasscodeRepository - a simple example of a ios keychain based repository for https://github.com/yankodimitrov/SwiftPasscodeLock
View KeychainPasscodeRepository.swift
//
// 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
View onename
Verifying that +kristofer is my blockchain ID. https://onename.com/kristofer
@kristofer
kristofer / gist:560ba94600351f47a495
Last active Jul 28, 2020
iOS Share Extension NSPredicate trick
View gist:560ba94600351f47a495
//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 (
@kristofer
kristofer / pythonmath.py
Created Jul 17, 2013
A simple float versus integer example.
View pythonmath.py
# 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
You can’t perform that action at this time.