[{"data":1,"prerenderedAt":398},["ShallowReactive",2],{"project-12163689":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":45,"post_text":47,"what":48,"said":85,"maker_in_thread":188,"shape":200,"grid":204,"attempts":360,"same_week":361,"maker_shows":38,"maker_hidden":390,"reader_version":391,"card":392},"12163689","github-widget","A Github profile widget (learning to code)","title","Show HN: I created a Github profile widget (learning to code)","https:\u002F\u002Fgithub.com\u002Fsurbhioberoi\u002Fgithub-widget","github.com","thewriter",1469514015,2016,176,62,171,2264,8,"notable","dev_tools","embeddable profile widget","library",[24,25,26,27],"github profile widget","github embed","github repositories widget","javascript widget","curious",0.208,{"positive":31,"neutral":32,"mixed":33,"critical":34},7,13,3,2,25,{"execution":37,"performance":39,"design":41,"privacy":42,"docs":43,"idea":44},{"positive":34,"critical":38},1,{"positive":40,"critical":40},0,{"positive":38,"critical":40},{"positive":40,"critical":40},{"positive":40,"critical":40},{"positive":40,"critical":38},[33,33,33,33,40,46,33,40,33,40,40,40,33,33,40,33,33,33,40,33,46,40,33,46,40,40,40,40,40,40,40,40,40,40,40,40,38,46,46,46],5,null,{"problem":47,"audience":47,"pricing":47,"motivation":49,"time_to_build":47,"stack":58,"openness":82,"stage":83,"team_size":84},{"value":50,"source":51,"evidence":52},"Learning to code","maker",[53,55],{"id":54},"post",{"id":56,"by":11,"text":57},"12163785","Hi, it's been 10 months since I began coding and I absolutely love it. :)",[59,71],{"value":60,"source":61,"evidence":62},"JavaScript","commenter",[63,67],{"id":64,"by":65,"text":66},"12164366","NKCSS","Small tip to get some more performance; never repeat your selectors. If you need $(\".stats\") four times, don't repeat that four times, but do: ``` var stats = $('.stats') ``` and…",{"id":68,"by":69,"text":70},"12164680","egeozcan","A humble suggestion for more readability (warning: opinionated): ``` const reposInfoHTML = repos .map(repo => `\u003Cdiv class=\"container\"> \u003Cdiv class=\"item names\"> \u003Cdiv> \u003Ca…",{"value":72,"source":61,"evidence":73},"jQuery",[74,78],{"id":75,"by":76,"text":77},"12164136","wassago","Next task (upping the skill level): Remove jQuery as a dependancy.",{"id":79,"by":80,"text":81},"12170737","vtempest","This isn't good advice. jQuery will get those variables just as fast. You're really splitting hairs just for the sake of criticizing.…","open_source","unknown","solo",{"praise":86,"objections":109,"requests":139,"questions":158,"alternatives":173},[87,98],{"value":88,"source":61,"evidence":89},"Clean, readable code for a beginner",[90,94],{"id":91,"by":92,"text":93},"12163999","maaaats","That's surprisingly readable for someone having coded less than a year. Granted, it's only about a 100 lines so not that much complexity, but still separated into smaller,…",{"id":95,"by":96,"text":97},"12164068","spdustin","Brava! Very clean and thoughtful architecture, especially impressive given your short history with code, and that humbles me, an \"old guy\" compared to most of the readers here.…",{"value":99,"source":61,"evidence":100},"Good work for someone learning to code",[101,105],{"id":102,"by":103,"text":104},"12164235","parr0t","As someone who is also learning to code and has been for about 18 months, great job :)",{"id":106,"by":107,"text":108},"12164206","hndl","Nice project! Kudos for sticking to the learning bit -- being motivated without external forces is harder than most people think. Suggestion: you're getting a lot of good…",[110,117,124,132],{"value":111,"source":61,"evidence":112},"Appends styles to the host page body, which can alter links",[113],{"id":114,"by":115,"text":116},"12164243","lepunk","Nice job! One suggestion from a person who developed widgets used on lots of sites: You are appending general styles (like styling the a tag, \".container\" which is a popular…",{"value":118,"source":61,"evidence":119},"Possible XSS from inserting GitHub profile fields as HTML",[120],{"id":121,"by":122,"text":123},"12164075","mbrock","Cool! If you're not 100% sure that the GitHub data fields (bio, name, etc) are stripped of markup, please ensure that your widget isn't vulnerable to cross-site scripting (XSS).…",{"value":125,"source":61,"evidence":126},"Repeated jQuery selectors and appends hurt performance",[127,128],{"id":64,"by":65,"text":66},{"id":129,"by":130,"text":131},"12168066","pacomerh","Good stuff. Tip: Rather than repeating .append several times, concatenate your result in a variable, then at the end append the complete result. That way you just make one append…",{"value":133,"source":61,"evidence":134},"Shows wrong top repositories for some users",[135],{"id":136,"by":137,"text":138},"12164317","gbraad","Nice! note: I haven't filed it as bug yet, as I am unsure about the reason yet. But when I user data-username=\"gbraad\" I do not see the correct Top repositories. At the top…",[140,144,151],{"value":141,"source":61,"evidence":142},"Remove jQuery dependency",[143],{"id":75,"by":76,"text":77},{"value":145,"source":61,"evidence":146},"Use EsLint and underscore templating",[147],{"id":148,"by":149,"text":150},"12164265","mundanevoice","Looks cool. Couple of pointers: - Use a tool like EsLint to lint your code. It will make it more readable and cleaner than it is right now. Maybe integrate your editor with…",{"value":152,"source":61,"evidence":153},"Show 'today' instead of 'Last active 0 days ago'",[154],{"id":155,"by":156,"text":157},"12164360","Ichaelus","Small note: \"Last active 0 days ago\" would be nice to be written as \"today\" :)",[159,166],{"value":160,"source":61,"evidence":161},"What is the alternative to jQuery here?",[162],{"id":163,"by":164,"text":165},"12164421","akagetsu01","what is the alternative in this case?",{"value":167,"source":61,"evidence":168},"What security practices should widget makers follow?",[169],{"id":170,"by":171,"text":172},"12164105","LukaszB","Well done! It would be very handy to know what is a 'must have list' when implementing those kind of widgets, does anyone came across anything like this? I mean what I shall be…",[174,181],{"value":175,"source":61,"evidence":176},"github-cards by lepture",[177],{"id":178,"by":179,"text":180},"12164023","kxxoling","Lepture have created a similar one before: https:\u002F\u002Fgithub.com\u002Flepture\u002Fgithub-cards",{"value":182,"source":61,"evidence":183},"gh-events-widget by todvora",[184],{"id":185,"by":186,"text":187},"12164166","tdvorak","GitHub API and JSONP support is a nice way, how to play with those data in browsers. I wanted to have a GitHub timeline on my personal website, instead of the Twitter timeline.…",{"comments":189,"answered":34,"key":190},6,[191,194,197],{"id":192,"text":193},"12164080","Thanks, it still has some formatting issues and can be better. I try my best.",{"id":195,"text":196},"12164097","Thanks, good to learn about this, will make changes to the code to reflect this.",{"id":198,"text":199},"12164152","Yes, I want to do that. Thanks",{"commenters":201,"max_depth":46,"maker_replies":189,"first_comment_mins":202,"lifespan_hours":203},40,29,60,[205,207,209,211,214,217,219,221,223,225,227,229,231,232,234,237,239,242,246,247,250,252,254,256,258,259,261,266,269,272,273,276,281,282,284,288,293,296,300,303,306,309,311,314,316,318,321,323,325,329,331,333,335,340,344,349,354,358],[114,40,33,206,115,40],"project\u002Fmixed\u002Fexecution",[64,38,33,208,65,40],"project\u002Fmixed\u002Fperformance",[68,38,33,210,69,40],"project\u002Fneutral\u002Fdesign",[212,38,33,213,65,40],"12164870","project\u002Fneutral\u002Fexecution",[215,38,33,216,130,40],"12168084","project\u002Fneutral\u002Fperformance",[79,38,40,218,80,40],"commenter\u002Fneutral\u002Fperformance",[220,38,40,218,65,40],"12171191",[91,34,46,222,92,40],"maker\u002Fpositive\u002Fexecution",[192,34,40,224,11,38],"maker\u002Fneutral\u002Fexecution",[121,33,33,226,122,40],"project\u002Fmixed\u002Fprivacy",[195,33,40,228,11,38],"maker\u002Fneutral\u002Fprivacy",[75,230,33,213,76,40],4,[198,230,40,224,11,38],[163,230,40,233,164,40],"commenter\u002Fneutral\u002Fexecution",[235,230,40,233,236,40],"12164473","laacz",[238,230,40,233,80,40],"12170759",[240,230,40,233,241,40],"12170810","flukus",[243,46,33,244,245,40],"12163773","maker\u002Fneutral\u002Fnone","awalGarg",[56,46,40,244,11,38],[248,46,33,244,249,40],"12163919","wyclif",[251,46,40,244,11,38],"12163927",[253,46,33,244,249,40],"12163949",[170,189,33,255,171,40],"project\u002Fneutral\u002Fprivacy",[155,31,33,257,156,40],"project\u002Fneutral\u002Fdocs",[129,18,33,216,130,40],[148,260,33,213,149,40],9,[262,263,40,264,265,40],"12164420",10,"commenter\u002Fneutral\u002Fnone","shubhamjain",[136,267,38,268,137,40],11,"project\u002Fcritical\u002Fexecution",[106,270,46,271,107,40],12,"maker\u002Fpositive\u002Fnone",[95,32,46,222,96,40],[178,274,40,275,179,40],14,"other\u002Fneutral\u002Fidea",[277,278,33,279,280,40],"12163989",15,"maker\u002Fneutral\u002Fidea","ing33k",[185,278,40,275,186,40],[102,283,46,271,103,40],16,[285,286,40,275,287,40],"12164268",17,"janvdberg",[289,290,40,291,292,40],"12164429",18,"other\u002Fcritical\u002Fidea","rplnt",[294,290,40,291,295,40],"12164521","atmosx",[297,290,40,298,299,40],"12164541","other\u002Fneutral\u002Fnone","frogfuzion",[301,290,40,264,302,40],"12164569","29382393221",[304,290,40,264,305,40],"12166557","dang",[307,290,40,264,308,40],"12164602","forgotpwtomain",[310,290,40,264,305,40],"12166533",[312,290,40,264,313,40],"12167495","Chris2048",[315,290,40,264,305,40],"12167625",[317,290,40,264,292,40],"12171467",[319,290,40,264,320,40],"12166965","brudgers",[322,290,40,264,292,40],"12171430",[324,290,40,264,320,40],"12182111",[326,327,40,298,328,40],"12164238",19,"throwawaykjkjkj",[330,327,40,264,313,40],"12164478",[332,327,40,298,328,40],"12164551",[334,327,40,264,305,40],"12166490",[336,337,38,338,339,40],"12164659",20,"project\u002Fcritical\u002Fidea","machbio",[341,337,33,342,343,40],"12164679","project\u002Fneutral\u002Fidea","LukeB_UK",[345,346,46,347,348,40],"12164600",21,"maker\u002Fpositive\u002Fdesign","wildster",[350,351,46,352,353,40],"12164012",22,"project\u002Fpositive\u002Fnone","rajeshwadhwani",[355,356,46,352,357,40],"12163867",23,"bechampion",[359,356,40,244,11,38],"12163940",[],[362,367,372,377,381,386],{"id":363,"name":364,"points":365,"category":366},"12166687","Web Design in 4 minutes",1624,"learning_science",{"id":368,"name":369,"points":370,"category":371},"12136011","Riko",283,"languages",{"id":373,"name":374,"points":375,"category":376},"12159249","Kubernetes Certificate Manager",186,"infrastructure",{"id":378,"name":379,"points":380,"category":371},"12175830","sha256-simd",156,{"id":382,"name":383,"points":384,"category":385},"12166370","EventQL",90,"data",{"id":387,"name":388,"points":389,"category":20},"12137698","kilo",85,false,"v2",{"id":393,"name":5,"line":6,"ai":390,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":394,"top":18,"kw":395,"maker":11,"domain":10,"tier":19,"attempts":40,"strip":396,"url":9,"mix":397,"praise":88,"objection":111,"sub":21},12163689,0.21,[24,25,26,27],"3333053030003303330350350000000000001555",[31,32,33,34],1794036546208]