Skip to content

Instantly share code, notes, and snippets.

View aabmass's full-sized avatar

Aaron Abbott aabmass

  • Google
  • Boston, MA
  • 03:57 (UTC -04:00)
View GitHub Profile
[
Metric(
attributes={'path': '/hello'},
description=None,
instrumentation_info=InstrumentationInfo(hellometer, None, None),
name='mycounter',
resource=<opentelemetry.sdk.resources.Resource object at 0x7f42784cd070>,
unit=None,
point=Sum(start_time_unix_nano=1646415738949420738, time_unix_nano=1646415738950119539, value=440, aggregation_temporality=<AggregationTemporality.CUMULATIVE: 2>, is_monotonic=True)
),
@aabmass
aabmass / contributions.graphql
Last active August 23, 2021 03:57
contributions YE2021
{
user(login: "aabmass") {
id
login
organizations(first: 10) {
nodes {
id
name
}
}
<style>
.department-name {
color: #FF6A00;
font-family: "Montserrat", Sans-serif;
font-size: 26px;
font-weight: 700;
}
INFO: Repository started
{
"renovateVersion": "24.70.3"
}
DEBUG: Using localDir: /mnt/renovate/gh/GoogleCloudPlatform/opentelemetry-operations-js
DEBUG: Repository cache is valid
DEBUG: initRepo("GoogleCloudPlatform/opentelemetry-operations-js")
DEBUG: Overriding default GitHub endpoint
{
"endpoint": "https://api.github.com/"
{
"data": {
"user": {
"id": "MDQ6VXNlcjE1MTAwMDQ=",
"login": "aabmass",
"organizations": {
"nodes": [
{
"id": "MDEyOk9yZ2FuaXphdGlvbjI2OTQ0NTI1",
"name": "OpenCensus"
@aabmass
aabmass / contributions.graphql
Last active August 20, 2020 16:40
GraphQL for my (or anyones) Github contributions
{
user(login: "aabmass") {
id
login
organizations(first: 10) {
nodes {
id
name
}
}
@aabmass
aabmass / dogthought.bash
Last active November 6, 2019 22:50
bash function (include in bashrc to work like an alias) to print a tweet from https://twitter.com/dog_feelings
function dogthought {
rand_val=$((1 + RANDOM % 10))
curl -s https://twitter.com/dog_feelings \
| xmllint --html -xpath "(/html/body/descendant::div[contains(@class, 'js-tweet-text-container')]/p[contains(@class, 'tweet-text')])[${rand_val}]/text()" - 2>/dev/null \
| cowsay -f <(curl -s https://gist.githubusercontent.com/aabmass/c4230d06daa7073d0fb537030ed7d05c/raw/960572ed504c576f58bb4d8d182f01a9aeb10f95/dog.cow)
}
@aabmass
aabmass / dog.cow
Created November 6, 2019 20:28
cowsay cowfile of dog
$the_cow = <<EOC;
$thoughts
$thoughts
_
,:'/ _..._
// ( `""-.._.'
\| / 6\___ /
| 6 4
| /
\_ .--'
@aabmass
aabmass / index.js
Last active October 12, 2016 07:32
Session with login form in express (express-session)
var express = require('express')
var parseurl = require('parseurl')
var session = require('express-session')
var bodyParser = require('body-parser');
var app = express()
app.use( bodyParser.json() ); // to support JSON-encoded bodies
app.use(bodyParser.urlencoded({ // to support URL-encoded bodies
extended: true
--- a/src/timezone-systemd.cpp 2014-06-30 15:38:53.397571301 -0400
+++ b/src/timezone-systemd-nullcheck.cpp 2014-06-30 15:40:35.128794407 -0400
@@ -63,6 +63,12 @@
SystemdTimezone::set_timezone()
{
const gchar * tz_new = timedate1_get_timezone(m_timedate);
+
+ if (tz_new == nullptr)
+ {
+ return; //quick fix