昨今の社会情勢の影響もありリモートワークを導入する企業・チームが増えてきましたが、 一口に「リモートワーク」といってもさまざまなスタイルがあります。
企業側と働く側のミスマッチを防ぐため、リモートワークにおける観点を列挙してみました。
どの程度リモートワークに比重を置いて導入しているかのチェックリストです。
If you, like me, resent every dollar spent on commercial PDF tools,
you might want to know how to change the text content of a PDF without
having to pay for Adobe Acrobat or another PDF tool. I didn't see an
obvious open-source tool that lets you dig into PDF internals, but I
did discover a few useful facts about how PDFs are structured that
I think may prove useful to others (or myself) in the future. They
are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.
There is a longstanding issue/missing feature/bug with sockets on Docker on macOS; it may never work; you'll need to use a network connection between Docker containers and X11 on macOS for the foreseeable future.
I started from this gist and made some adjustments:
host.docker.internal
name for the the container host, instead.import * as React from 'react'; | |
import { Component, ComponentClass, createRef, forwardRef, Ref } from 'react'; | |
const myHoc = <ComposedComponentProps extends {}>( | |
ComposedComponent: ComponentClass<ComposedComponentProps>, | |
) => { | |
type ComposedComponentInstance = InstanceType<typeof ComposedComponent>; | |
type WrapperComponentProps = ComposedComponentProps & { | |
wrapperComponentProp: number; |
services.xserver = { | |
enable = true; | |
monitorSection = '' | |
Option "NODPMS" | |
''; | |
serverLayoutSection = '' | |
Option "BlankTime" "0" | |
Option "DPMS" "false" | |
''; | |
displayManager.auto.user = "guest"; |
An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.
C-M-f | sp-forward-sexp |
C-M-b | sp-backward-sexp |
#! /usr/bin/env nix-shell | |
#! nix-shell -i bash -p jq less | |
nix-instantiate --eval --strict -E 'map (x: x.name) (import <nixpkgs/nixos> {}).config.environment.systemPackages' --json | jq -r '.[]' | sort -u | less |
#!/usr/bin/env bash | |
sudo mkdir -p /run/nix/current-load | |
sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
sudo rm /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
sudo curl -fsSL -o /Library/LaunchDaemons/org.nixos.nix-daemon.plist https://gist.github.com/LnL7/ba2eac19e77cd6b4bb02c8de03bf5f4e/raw/69722c2b13c4eb022a1312cd6891838b413e1f96/org.nixos.nix-daemon.plist | |
sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
# Configure /etc/nix/machines | |
# Make sure root can ssh to the builder (known_hosts etc.) |
We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.
Let’s create our table driven test, for convenience, I chose to use t.Log
as the test function.
Notice that we don't have any assertion in this test, it is not needed to for the demonstration.
func TestTLog(t *testing.T) {
t.Parallel()
When you create a npm package, remember it might be used in a browser or a server, or even a command line utility… For each package you create, please pay attention at what it will be used for: