Skip to content

Instantly share code, notes, and snippets.

<p>The files that could have been potentially accessed included a ton of sensitive information: SSL keys, database passwords with read/write access to our production databases, basically everything you never want a third party to see. Somebody with access to the database could replace npm modules with malicious payloads. I don't want to blur the truth here: this could have been a disaster. It is very much like the <a href="http://venturebeat.com/2013/01/30/rubygems-org-hacked-interrupting-heroku-services-and-putting-millions-of-sites-using-rails-at-risk/">rubygems.org security breach</a> in early 2013, and we are similarly lucky that the effect was not much much worse.</p>
<p>Thankfully, there's no evidence that, other than ourselves, the engineers who reported the bugs, and a few members of the GitHub security team who knew about the issue, anyone knew about this hole. But, in the interests of transparency, we should be clear that we can't <strong>prove</strong> that: the logs we kept at the time were not su
@jesslilly
jesslilly / Cake.java
Last active August 29, 2015 13:57
Jetty, Jersey, Guice, JAXB Sample
// See http://blog.bdoughan.com/2011/06/using-jaxbs-xmlaccessortype-to.html
@XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)
@XmlRootElement
public class Cake implements PlainTextBean {
private String type;
// The getter is up here since the order of fields affects the order in the
// xml.
public String getType() {
return type;
function foo() {
var er = new Error('foo() has been removed in favor of bar(). Please update your java scripts codes.')
Error.captureStackTrace(er, foo)
throw er
}
function bar() {
console.log('ok')
}
@DanDiplo
DanDiplo / JS-LINQ.js
Last active May 8, 2025 17:25
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
@jesslilly
jesslilly / ProductControl.cs
Last active August 11, 2023 17:09
How would you refactor this code?
using System.Collections.ObjectModel;
using System.Runtime.CompilerServices;
using System.Security.Cryptography.X509Certificates;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace MyApplication.Web.Controllers
{
public class ProductControl : Controller
{