Skip to content

Instantly share code, notes, and snippets.

View kijanawoodard's full-sized avatar

Kijana Woodard kijanawoodard

View GitHub Profile
@kijanawoodard
kijanawoodard / _usage.md
Created April 8, 2021 00:21 — forked from amirrajan/_usage.md
Layout Theory for RubyMotion

Usage:

rect = LayoutTheory.rect row: 0, col: 0, w: 10, h: 2
some_view.frame = CGRectMake rect[:x], rect[:y], rect[:w], rect[:h]
# This is a blocklist to block samsung smart tv's sending meta data at home.
# Please help to collect domains!
# It could be that the TV does not receive any more updates or other services no longer work. Please report such an incident.
device-metrics-us.amazon.com
samsungacr.com
samsungcloudsolution.com
samsungcloudsolution.net
pavv.co.kr
samsungotn.net
@kijanawoodard
kijanawoodard / gist:5457391
Last active December 16, 2015 15:39 — forked from anonymous/gist:3187299
Score weighting
DateTimeOffset startingPoint = new DateTimeOffset(2008, 4, 1, 0, 0, 0, TimeSpan.Zero);
// this calculates a score to be used for how hot an Audio is, a boost is given to Downloads over plays, same for likes and favourites
// with a favourite the most valuable, a single favourite stat is worth 20 points where as a play is just 1 point
var playScore = Math.Max(TotalPlays / 1.5, 1);
var downloadScore = Math.Max(TotalDownloads * 2, 1);
var likesScore = Math.Max(TotalLikes * 4, 1);
var favScore = Math.Max(TotalFavourites * 5, 1);
var score = Math.Log10(playScore + downloadScore + likesScore + likesScore + favScore);