Skip to content

Instantly share code, notes, and snippets.

matt swanson swanson

Block or report user

Report or block swanson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:2177df1a5bde7dc03424f1509619cc64
"id": "MqdKxNWfuUSj0wAERp0G6p9qDAIZ",
"jerseyNumber": 59,
"name": {
"familyName": "Okine",
"givenName": "Earl"
},
"position": "DEFENSIVE_END"
},
"stats": {
"assistedTackles": 1,
View gist:2081c9031ac9d5574e4e8d9ec9ae95d8
for position, min_limit, max_limit in POSITION_LIMITS:
position_cap = solver.Constraint(min_limit, max_limit)
for i, player in enumerate(all_players):
if position == player.position:
position_cap.SetCoefficient(variables[i], 1)
# add this section
flex_spot = solver.Constraint(1, 1)
for i, player in enumerate(all_players):
@swanson
swanson / gist:1a5866f935954432763c807f52ef17ae
Last active Jul 20, 2016
my dumb elixir/phoenix questions
View gist:1a5866f935954432763c807f52ef17ae
what is `index/2` and why does elixir care about arity so much?
is mix like Rake or the Rails commands? both? neither?
what's the |> syntax? What's it called (ala hash-rocket)?
How do I do a `rails c` equivalent?
Is there something like `pry`?
View gist:86f2133bf84cb531cab8de652195e54e
http://www.meetup.com/Open-Indy-Brigade/events/230315754/
http://www.kizan.com/events/
Hello-A member of the Microsoft team and a partner of ours suggested that I share this free hands-on Azure/IoT workshop with your group. The workshop will take place in Indianapolis on 6/7. Participants will use a Raspberry Pi Starter Kit to build a compelling IoT/Azure/BI story. More details and registration link are here http://www.kizan.com/events/ Please let me know if you have any questions and thank you in advance for sharing this opportunity with your group.
https://twitter.com/CircleCityCon
For next month: http://www.meetup.com/High-Fives-Happy-Hour/events/231546188/
View gist:7d551c3e479ab46871bac1bf7070048c
> ruby -v
ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin13]
> irb
irb(main):001:0> require 'csv'; CSV
=> CSV
> ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin13]
> irb
irb(main):001:0> require 'csv'; CSV
View gist:7e91c7676301fdd6008a1545bc5dfdf5
Hey there, I'm Ben, one of the developers working on FormKeep: the form backend for designers and developers.
Over the next few months, we're going to be investing heavily in the product and I want to make sure we're building the features that *you* want. To ensure that happens, would you please take this 5-minute survey?
I'm only sending this to a handful of our active users, so every response counts. I know it won't be the highlight of your week but it'll mean that future FormKeep changes will make it even better for you.
Side bonus: the entire survey is keyboard-navigable. No mouse required!
Thank you to the hundredth power :)
@swanson
swanson / text.js
Created Feb 15, 2016
pixi wordbreak
View text.js
Text.prototype.wordWrapWordBreak = function(text) {
var result = '';
var lines = text.split('\n');
var wordWrapWidth = this._style.wordWrapWidth;
for (var i = 0; i < lines.length; i++) {
var spaceLeft = wordWrapWidth;
var characters = lines[i].split('');
for (var j = 0; j < characters.length; j++) {
var characterWidth = this.context.measureText(characters[j]).width;
if (j === 0 || characterWidth > spaceLeft) {
@swanson
swanson / gist:3d706bfa9271d2a45df9
Created Jan 26, 2016
Segment users based on github account
View gist:3d706bfa9271d2a45df9
Auth with Github -> github username
github username -> https://api.github.com/users/swanson/repos
Repos have a `language` field -> find most occuring language
Segment users based on most occurring language:
* ObjC/Swift -> iOS trail
* Ruby -> Rails trail
* Javascript -> React trail
View gist:a1c4bd7f5c01750f3af5
http://www.panozzaj.com/blog/2015/09/19/github-pull-request-workflow-labels/
http://aimeeault.com/2015/09/21/disabling-superhero-mode-at-night-or-how-to-properly-turn-off-work-notifications-after-work/
View gist:8808e863d77531cf1274
Randy Skopecek podcast: https://itunes.apple.com/us/podcast/talk-about-know-priorities/id1031383725
https://github.com/WhiteVoidia/ludum-dare-33
Tech point hackathon
Dev workshop conf
react meetup
Anthony's "do it more" blog post
http://mike-rogers.github.io/2015/06/01/mutation-testing-totally-a-thing/
You can’t perform that action at this time.