Skip to content

Instantly share code, notes, and snippets.

View samkirton's full-sized avatar
🏹

Samuel Kirton samkirton

🏹
View GitHub Profile
{
"name": "Samuel Kirton",
"title": "Senior Android Developer",
"description": "Mobile App Developer experienced in developing solutions from requirements to production for leading financial institutions in the UK. I strive to develop simple solutions to complex problems, with meaningful test coverage and responsive user interfaces.",
"experience": [
{
"title": "EOS Global Hackathon",
"dateRange": "November 2018 - December 2018",
"description": "I put together a multidisciplinary team of past colleagues for the EOS Global hackathon in London, we developed a PPI passport Android app, which came in 3rd place out of 90 teams. I developed eos-jvm, an SDK for interacting with the EOS blockchain and the EOS REACH wallet as necessary groundwork for the competition. In December we joined the top 3 teams from the; Hong Kong, Sydney and San Francisco hackathons for an incubator week and pitch competition in Cape Town, South Africa.",
"links": [
@samkirton
samkirton / sha256.cpp
Created September 18, 2018 21:38
eos-smart-contract-sha256
#include <eosiolib/crypto.h>
checksum256 uniqueId;
auto purchaseIdChar = purchaseId.c_str();
sha256((char *)purchaseIdChar, sizeof(purchaseIdChar), &uniqueId);
printhex(&uniqueId, sizeof(uniqueId));
@samkirton
samkirton / nowDateOnly.js
Created October 19, 2017 15:53
MongoDB aggregate query that projects the current date without hours, seconds and milliseconds
Podcast.aggregate([
{
$project: {
now: new Date()
}
},
{
$project: {
nowDateOnly: {
$subtract:[
@samkirton
samkirton / update_deps_no_ui
Created August 21, 2017 13:23
Update android support library dependency with no ui
echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
@samkirton
samkirton / snippet.groovy
Created June 8, 2017 12:54
Annotation preprocessor in test package
android.applicationVariants.all {
def aptOutputDir = new File(buildDir, "generated/source/apt/${it.unitTestVariant.dirName}")
it.unitTestVariant.addJavaSourceFoldersToModel(aptOutputDir)
}
/Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/BOOT_DISK_NAME --applicationpath /Applications/Install\ macOS\ Sierra.app
GIT_COMMITTER_NAME="samkirton" GIT_COMMITTER_EMAIL="samkirton@me.com" GIT_COMMITTER_DATE="16 January 2017 at 20:19:10 GMT" git commit --amend --date "16 January 2017 at 20:19:10 GMT"
@samkirton
samkirton / gist:9ae8e15de756a006d74f
Last active August 29, 2015 14:06
Run a remote Jenkins job and wait for a response
import jenkins
import time
JOB_NAME = 'job_name'
URL = 'http://jenkins_url'
TIMEOUT = 120
SLEEP = 5
def get_job_info(j):
return j.get_job_info(JOB_NAME)
@samkirton
samkirton / gist:8d8b2ba146969a613da1
Last active August 29, 2015 14:06
Increment a maven POM minor version
from xml.etree import ElementTree as ET
file = open('pom.xml')
# NOTE: edit the pom.xml manually to increase to a major version
minor_version_increment = 0.01
ET.register_namespace("", "http://maven.apache.org/POM/4.0.0")
tree = ET.ElementTree()
tree.parse(file)
@samkirton
samkirton / gist:0242ba81d7ca00b475b9
Last active November 14, 2022 13:31
Fixed a bug where images added to the MediaStore are not inserted at the front of the gallery
package com.memtrip;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.graphics.Bitmap;