This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import com.amplifyframework.core.Amplify | |
import com.amplifyframework.storage.StorageAccessLevel | |
import com.amplifyframework.storage.operation.StorageDownloadFileOperation | |
import com.amplifyframework.storage.options.StorageDownloadFileOptions | |
import com.bumptech.glide.Glide | |
import com.bumptech.glide.Priority | |
import com.bumptech.glide.Registry | |
import com.bumptech.glide.annotation.GlideModule | |
import com.bumptech.glide.load.DataSource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Amplify | |
//import AmplifyExtensions | |
import struct Kingfisher.KFImage | |
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
VStack { | |
Button(action: onFileUpload) { | |
Text("Upload file") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Reading: | |
# | |
# - http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac | |
# - https://gist.github.com/MatthewMueller/e22d9840f9ea2fee4716 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Blowout | |
module Api | |
Client = RC::Builder.client do | |
use RC::DefaultSite, 'http://localhost:7272' | |
use RC::JsonResponse, true | |
use Blowout::Api::HashResponse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Blowout | |
module Api | |
class BaseResource < Hashie::Mash | |
# include RestCore | |
# include Blowout::Api | |
# include Blowout::Api::Client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use absolute URLs to navigate to anything not in your Router. | |
// Only need this for pushState enabled browsers | |
if (Backbone.history && Backbone.history._hasPushState) { | |
// Use delegation to avoid initial DOM selection and allow all matching elements to bubble | |
$(document).delegate("a", "click", function(evt) { | |
// Get the anchor href and protcol | |
var href = $(this).attr("href"); | |
var protocol = this.protocol + "//"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(global) { | |
var myself = global.people.findById(global.github.me.dna()); // lol | |
myself.roll = myself.roll || function(weed, paper) { | |
weed = this.getGrinder().grind(weed); | |
return _.extend(weed, paper); | |
}; | |
var session = new Session({ | |
location : Location.SAME_OLD_SPOT, | |
people : _.union([myself], myself.getFriends().filter(Person.POT_HEAD)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query.append("START activity = node:__types__(className={activityClass}) ") | |
// .append("MATCH (activity)-[*1..2]->(source), ") | |
// .append("(source)<-[:HAS_SOURCE]-(lastActivities) ") | |
.append("MATCH (activity)-[*1..2]->(source)<-[:HAS_SOURCE]-(lastActivities) ") | |
.append("WHERE source.__type__ in {sourceTypes} ") | |
.append("RETURN source as source, COLLECT(lastActivities) as activities ") | |
// .append("ORDER BY activity.when DESC LIMIT 20"); why can't I use activity anymore? because of second match | |
.append("LIMIT 20"); |