A common and reliable pattern in service unit files is thus:
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
} | |
NodeList.prototype.__proto__ = Array.prototype; |
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" | |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Copyright (C) 2015-2017 Carlos Jenkins <carlos@jenkins.co.cr> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
const linkEl = document.createElement('link'); | |
linkEl.rel = 'prefetch'; | |
linkEl.href = urlWithYourPreciousData; | |
document.head.appendChild(linkEl); |
Someone recently asked me when an async function in JavaScript "returns". This is an interesting question because while a function like f()
below has a return
statement in it, f()
actually returns much earlier than that. To understand how this works, let's take a look at an example function. Here, a()
and c()
are normal synchronous functions and b()
is another asynchronous function.
async function f() {
a();
await b();
return c();
}
import sublime | |
import sublime_plugin | |
class NumberCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
selection = self.view.sel() | |
for region in selection: | |
try: | |
value = int(self.view.substr(region)) | |
self.view.replace(edit, region, str(self.op(value))) |
I've had many people ask me questions about OpenTracing, often in relation to OpenZipkin. I've seen assertions about how it is vendor neutral and is the lock-in cure. This post is not a sanctioned, polished or otherwise muted view, rather what I personally think about what it is and is not, and what it helps and does not help with. Scroll to the very end if this is too long. Feel free to add a comment if I made any factual mistakes or you just want to add a comment.
OpenTracing is documentation and library interfaces for distributed tracing instrumentation. To be "OpenTracing" requires bundling its interfaces in your work, so that others can use it to time distributed operations with the same library.
OpenTracing interfaces are targeted to authors of instrumentation libraries, and those who want to collaborate with traces created by them. Ex something started a trace somewhere and I add a notable event to that trace. Structure logging was recently added to O
%%%% | |
%%%% A chromatic maze generator | |
%%%% | |
% By Adam M. Smith (amsmith@soe.ucsc.edu) | |
% This answer set program was designed to work with the Potassco (the Potsdam | |
% Answer Set Solving Collection) tools, namely "clingo". | |
%% Chromatic Mazes |