Skip to content

Instantly share code, notes, and snippets.

#
# history of linux-headers-generic
#
$ grep "linux-headers-generic" /var/log/dpkg.log
2020-07-02 10:38:01 upgrade linux-headers-generic:amd64 5.3.0.61.51 5.4.0.40.43
2020-07-02 10:38:01 status half-configured linux-headers-generic:amd64 5.3.0.61.51
2020-07-02 10:38:01 status unpacked linux-headers-generic:amd64 5.3.0.61.51
2020-07-02 10:38:01 status half-installed linux-headers-generic:amd64 5.3.0.61.51
2020-07-02 10:38:01 status unpacked linux-headers-generic:amd64 5.4.0.40.43
// ==UserScript==
// @name Trap ctrl+enter on git.corp
// @description Stop git.corp from handling ctrl+enter keyboard shortcut (e.g., for submitting issue comment)
// @run-at document-start
// @version 0.1
// @author Joel Brandt <jobrandt@adobe.com>
// @match https://git.corp.adobe.com/*
// @grant none
// @downloadURL https://gist.githubusercontent.com/joelrbrandt/db09a4360782d88636c318a089bb5c29/raw/trap-ctrl-enter.js
// @updateURL https://gist.githubusercontent.com/joelrbrandt/db09a4360782d88636c318a089bb5c29/raw/trap-ctrl-enter.js
@joelrbrandt
joelrbrandt / get.js
Last active August 29, 2015 14:08
getting the contents of a url as a string using node
var getURL = function (url, cb) {
var http = require("http");
var result = "",
finished = false;
var finishedHandler = function (err, val) {
if (!finished) {
finished = true;
cb(err, val);
@joelrbrandt
joelrbrandt / drag.html
Created July 24, 2014 13:14
in-window drag test
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Default functionality</title>
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<style>
#draggable { width: 150px; height: 150px; padding: 0.5em; border: thin solid black; background-color: white;}
</style>

Keybase proof

I hereby claim:

  • I am joelrbrandt on github.
  • I am joelrbrandt (https://keybase.io/joelrbrandt) on keybase.
  • I have a public key whose fingerprint is 4180 C780 88D4 FA7E 2C7F A110 2A65 A817 C946 ACE5

To claim this, I am signing this object:

@joelrbrandt
joelrbrandt / main.js
Created February 3, 2014 15:10
Launch new generator-core from old generator-core
(function () {
"use strict";
function startDumping(theGenerator) {
setInterval(function () {
console.log("[UPDATED-LAUNCHER] requesting doc info");
theGenerator.getDocumentInfo().done(
function (info) {
console.log("[UPDATED-LAUNCHER] got doc info: %s", JSON.stringify(info, null, " "));
}, function (err) {
@joelrbrandt
joelrbrandt / examplePluginMain.js
Created January 22, 2014 01:56
getPixmap Bounds Shim Addresses bug #134 in Adobe Generator core, which is present in core versions prior to 2.0.2: https://github.com/adobe-photoshop/generator-core/issues/134 This shim _should_ replace getPixmap with a backwards compatible version. Additionally, if the core is at least as new as 2.0.2 or the shim has already been loaded, it wi…
(function () {
"use strict";
var _generator = null,
_config = null;
function init(generator, config) {
_generator = generator;
_config = config;
@joelrbrandt
joelrbrandt / send_gmail.py
Created September 11, 2013 15:27
Send an email through gmail's smtp using python
import smtplib
hostname = 'smtp.gmail.com'
port = 587
username = 'someone@gmail.com'
from_address = 'someone@gmail.com'
from_name = 'Someone Doe'
password = '1234'
def send_email(to_address, to_name, subject, message):
Handlebars.registerHelper 'each_with_index', (array, fn) ->
buffer = ''
for i in array
item = i
item.index = _i
buffer += fn(item)
buffer
@joelrbrandt
joelrbrandt / gist:6189321
Created August 8, 2013 22:17
buggy json
{
"version": "0.2.0",
"timeStamp": 1375921607.634,
"id": 1116,
"file": "Sans titre-1",
"bounds": {
"top": 0,
"left": 0,
"bottom": 340,
"right": 454