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 / 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
@joelrbrandt
joelrbrandt / stream-first-buffer-length-bench.js
Created July 14, 2013 18:03
Benchmark test for reading from Node.js stream2, with addition of a firstBufferLength property
(function () {
"use strict";
var stream = require("stream");
var i, b,
startTime, endTime, totalTime,
readCount, bytesRead, bytesReadThisTest,
rs;
@joelrbrandt
joelrbrandt / stream-perf-test.js
Created July 9, 2013 16:13
Test performance of various ways of reading from node v0.10 streams
(function () {
"use strict";
var stream = require("stream");
var b, i, j, t, count;
var OUTER_LOOP_ITERATIONS = 1000,
INNER_LOOP_ITERATIONS = 100,
BLOCK_SIZE = 10000;
@joelrbrandt
joelrbrandt / simple_jquery_event.html
Created March 30, 2013 15:16
Simple jquery event, for testing debugger events
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
function sayHi() {
console.log("hi");
}
$(function () {
$("h1").on("mousedown", sayHi);
@joelrbrandt
joelrbrandt / .gitignore
Last active December 15, 2015 12:49
example server that wraps html content in an iframe
node_modules