Skip to content

Instantly share code, notes, and snippets.

Avatar

Xander Dunn xanderdunn

View GitHub Profile
View swift_nio_build_failure_verbose_output.txt
/usr/bin/xcrun --sdk macosx --show-sdk-path
/usr/bin/xcrun --sdk macosx --show-sdk-platform-path
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-12-05-a.xctoolchain/usr/bin/swiftc -print-target-info
/usr/bin/xcrun --sdk macosx --find xctest
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-12-05-a.xctoolchain/usr/bin/swiftc -print-target-info
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-12-05-a.xctoolchain/usr/bin/swiftc -print-target-info
/usr/bin/xcrun vtool -show-build /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-12-05-a.xctoolchain/usr/lib/swift/pm/4_2/libPackageDescription.dylib
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-12-05-a.xctoolchain/usr/bin/swiftc -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-12-05-a.xctoolchain/usr/lib/swift/pm/4_2 -lPackageDescription -Xlinker -rpath -Xlinker /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-12-05-a.xctoolchain/usr/lib/swift/pm/4_2 -target x86_64-apple-
@xanderdunn
xanderdunn / Package.resolved
Created Nov 12, 2020
periphery master build Package.resolved using Swift for Tensorflow 0.11
View Package.resolved
{
"object": {
"pins": [
{
"package": "AEXML",
"repositoryURL": "https://github.com/tadija/AEXML",
"state": {
"branch": null,
"revision": "502c4d43a6cc9c395d19111e09dc62ad834977b5",
"version": "4.6.0"
View tgfbeta_drugs.csv
Company Founded Product Type Furthest Research Started Fate Outcome Notes
Wyeth Pharmaceuticals (Pfizer) stamulumab (MYO-029) antibody Phase 2 Clinical Muscular Dystrophy 2005 dead didn't achieve significant muscle gain
Novartis & MorphoSys 1992 bimagrumab (BYM-338) antibody Phase 2b/3 Sporadic Inclusion Body Myositis 2013 dead didn't achieve significant muscle gain
Phase 2 Hip Fracture 2014 ongoing
Phase 2 Sarcopenia 2012 completed
Phase 2 Chronic Obstructive Pulmonary Disease 2012 completed
Phase 2 Cachexia 2011 completed
Phase 2 Diabetes 2016 ongoing
Scholar Rock 2012 SRK-015 antibody Expected to file IND Q2 2018 for spinal muscular atrophy ongoing
Atara (Amgen) 2012 PINTA-745 peptibody Phase 2 End Stage Renal Disease 2013 dead didn't achieve significant muscle gain
View gist:b9b3787b43cb47eeab6f
" TODO
" - Figure out how to jump around .h/.m files with ctags
" - Find some code dependency measurer: Find the GitHub repo of the guy who created a project for this.
" - Create a command that will create a NAME.cpp, NAME.hpp, and TAME.test.cpp file all in the right place
" - Figure out how to jump to the next line that has something marked in the gutter
" - Figure out what conflicts with <leader>n in Python files
" - Create a command that will display a symbol in the gutter for every line that was changed within the past x days. This would be super helpful for debugging.
" TODO Later
" - Set a sanitizer special case list so that it ignores any problems in the third party files: http://llvm.org/releases/3.6.0/tools/clang/docs/SanitizerSpecialCaseList.html
@xanderdunn
xanderdunn / difficult-sample.md
Created Oct 18, 2015
Example of difficult code sample
View difficult-sample.md
import scalaz.stream.async

val q = async.unboundedQueue[Int]
val src = q.dequeue

// Thread 1
q.enqueue(1) // ordinary side-effecting calls
q.enqueue(2)
...
@xanderdunn
xanderdunn / keybase.md
Created Sep 10, 2016
Keybase Public ID
View keybase.md

Keybase proof

I hereby claim:

  • I am xanderdunn on github.
  • I am xanderai (https://keybase.io/xanderai) on keybase.
  • I have a public key whose fingerprint is 683C D738 FC97 000B 79DA 19E7 E0A9 EA38 1B7D 2BAD

To claim this, I am signing this object:

View gist:a48ba62077381b827f89
#!/usr/bin/env python
#
# Copyright (C) 2014 Google Inc.
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@xanderdunn
xanderdunn / github_webook.rb
Created Mar 8, 2016
GitHub Mirroring WebHook
View github_webook.rb
require 'sinatra'
require 'json'
set :bind, '0.0.0.0'
post '/payload' do
# push = JSON.parse(request.body.read)
# puts "I got some JSON: #{push.inspect}"
system 'git fetch --all --prune'
system 'git push --mirror ssh://git@stash.osaro.net:7999/odin/core.git'
@xanderdunn
xanderdunn / scalazStreamExamples.md
Last active Oct 23, 2015
Scalaz-Stream By Example
View scalazStreamExamples.md

Mindset

Moving from imperative programming to functional programming requires a fairly large shift in mindset. Moving away from your mutable variables and control flow loops to a streams-based system of handling side effects requires a similar shift in mindset.

A Task encapsulates side effects. You can do just about anything you want in a Task. A Process as a stream of a specific piece of data. Think of it as a list of that data. For example, if you have a counter in your application, a single Process would be used to represent that Int. Think of a Process as a function that holds state that waits to emit a value when it's asked to. A Process is a state machine that can be in one of three states: emitting values, awaiting for the result of some request, or halted. It represents all values that you expect to get from your function. Those values could be simple, like a list of Ints, or it could be far more complex, like asynchronously waiting for responses from a remote server.

@xanderdunn
xanderdunn / rxScala.scala
Created Oct 9, 2015
Simples asynchronous RxScala example
View rxScala.scala
Observable(
subscriber => {
new Thread(new Runnable() {
def run() {
val i = 0 // do real shit here instead
subscriber.onNext(i)
}
if (!subscriber.isUnsubscribed) {
subscriber.onCompleted()
}