Skip to content

Instantly share code, notes, and snippets.

View nickmarx12345678's full-sized avatar

Patrick Marx nickmarx12345678

View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC9o+DSyrV0Ro5wYBt74CoqL05zay3uyw66u+6qA+YfyXOxAryZNJU1Y7REXqF8r6EfAlyHxiHEZlCVXIdSDFfTBeJEEizy2vqWV/8MioNG4y8qsFssOzTMLeQmJaGlCiWSKpNDrwZov6M3FgySHwTMVhUeRP2WIh5DzFtR
v49DQFSqh9aI0IXAqNP+K7Mu8ACkBnSlBj5QzFa79ttLwYBCIJz7IQbjxUM/q/qUscgpPgaqliTpHyU7X8SQiSGTJeMvu0NSLN13vgUBnKLMDxgfn9YYpZqTrVPFYhy8cT2JD/7yBuhwyA/hxkhULsCAX4pn5w9ZrZ7w557KgxM+7mgot1eSoSjrsn9I/YJsur4OUAbtkYYR
jKbGr1ogMGXQ615H0WhWctYZizgj4XNaEA4zWnJ9MQS2yO0vfGPjxyjKm1mOUDLC5ytmr1HANiRNBhzdr3sjKBytJI/7vJDxrgEKOtBt09W/Fg2k2ml7cot1qhOKfo8l4PqTgKZb++Bg/7lBSKSjuFr/V3SrJWzNkkmChq7BjNVXJhI0fI5N6c2cD5AyQVb5JLEKZmY7XuXG
dYzUCl15KrasR0C+edGdnt6dpe0SRiXwQSRH/z9j3d++rkEJEugcDct1ywVJmuwqpynzvD+l9MwPJQmgVov31QrVEmdh5emvd5upnnHXWolUqQ== patrick.k.marx@gmail.com
```
04-14 15:32:38.064 493-493/com.simplehuman.simplehuman.debug I/LightController: Get SAVEDPLACE EVENT
04-14 15:32:38.071 493-493/com.simplehuman.simplehuman.debug I/LightController: onMQTTMessageRecieved: products/ST3008/EC24B845911B/brightness
04-14 15:32:38.072 493-493/com.simplehuman.simplehuman.debug I/LightController: updateSlider: 35
04-14 15:32:38.073 493-493/com.simplehuman.simplehuman.debug I/LightController: onMQTTMessageRecieved: products/ST3008/EC24B845911B/autoBrightness
04-14 15:32:38.073 493-493/com.simplehuman.simplehuman.debug I/LightController: onMQTTMessageRecieved: products/ST3008/EC24B845911B/colorTemperature
04-14 15:32:38.074 493-493/com.simplehuman.simplehuman.debug I/LightController: updateSlider: 50
04-14 15:32:40.992 493-493/com.simplehuman.simplehuman.debug I/test: onMeasure availableSizes: [android.hardware.Camera$Size@3be67b8, android.hardware.Camera$Size@31eacf0, android.hardware.Camera$Size@2ceced8, android.hardware.Camera$Size@27ef0c0, android.hardware.Camera$Size@27ef000,
//client
RequestBody previewImg =
RequestBody.create(MediaType.parse("image/jpeg"), opts.getPreviewImageFile()); //File
RequestBody thumbnailImg =
RequestBody.create(MediaType.parse("image/jpeg"), opts.getThumbnailImageFile()); //File
RequestBody ownedProductId =
RequestBody.create(MediaType.parse("multipart/form-data"), opts.getOwnedProductId()); //String
//Retrofit interface
@Multipart
SELECT
p.*,
(SELECT COUNT(*) FROM posts_likes WHERE post_id=p.id) AS like_count,
(SELECT COUNT(*) FROM comments WHERE post_id=p.id) AS comment_count,
(SELECT COUNT(*) FROM posts WHERE p.original_post_id = original_post_id and id != original_post_id) AS repost_count, (SELECT array_agg(dat__categories.*) FROM (
SELECT
categories.id,
categories.name
FROM post_categories
JOIN categories ON post_categories.category_id = categories.id
Step 1:
We create a CacheKeyManager inside /code/managers/cache/key/, a class that extends CacheManager. This is not required but we do it just so that it's easier to keep a list of possible things being cached.
Step 2:
Take a look at LiteratureController.php line 278
$cm = new LiteratureCacheKeyManager($this->rootUUID);
['degree', 'angle', 'range', 'center', 'transformation', 'diagonal', 'equality', 'median', 'cube', 'vertex', 'radius', 'mean', 'base', 'addition', 'line segment', 'right angle', 'polynomials', 'obtuse angle', 'theoretical probability', 'right triangle', 'equilateral triangle', 'face', 'term', 'scalene triangle', 'cylinder', 'sphere', 'ray', 'supplementary angles', 'complementary angles', 'prism', 'mode', 'ratio', 'divisor', 'slope', 'chord', 'straight angle', 'edge', 'polygon', 'experimental probability', 'hypotenuse', 'parallel lines', 'rhombus', 'surface area', 'probability', 'cone', 'tetrahedron', 'pyramid', 'proportion', 'secant', 'denominator', 'area', 'scientific notation', 'quadrilateral', 'regular polygon', 'perpendicular lines', 'volume', 'no correlation', 'factorial', 'binomial', 'unit rate', 'statistics', 'hexagon', 'net', 'nonagon', 'point', 'negative correlation', 'coplanar', 'similar triangles', 'cartesian coordinate system', 'vertical angles', 'focus', 'frequency', 'square', 'factor', 'alternat
jQuery.fn.justtext = function() {
return $(this).clone()
.children()
.remove()
.end()
.text();
};
var walk_the_DOM = function walk(node, func) {
func(node);
@nickmarx12345678
nickmarx12345678 / gist:9f74aa5eb0c952e474d1
Created August 20, 2014 23:26
example resource_type groupings
{"Learning Guides":["lit","math","biology","chemistry","civics","career","bible","college","economics","history","lit","music","mythology","mythology-character"],"Courses":["shmooc-lessons"],"Test Prep":["accu-placer","ap","cset"],"Teaching Materials":["common-core-standards","teacher"],"Videos":["video"],"Study Tools":["math-shack-rule"]}