Can't open display?
Ensure DISPLAY
is exported and equal to host's DISPLAY
.
$ export DISPLAY=:0
No protocol specified?
let input = "{\"id\": 1, \"cell\":{\"id\":\"12345678-etc\"}}"; | |
let obj = JSON.parse(input) | |
console.log(obj.cell.id); // 12345678-etc | |
let match = obj.cell.id.match(/^\d*/); | |
let id = match[0]; | |
console.log(id) // 12345678 | |
console.log(typeof id) // string |
# remove all Modern apps from the system account | |
Get-AppXProvisionedPackage -online | Remove-AppxProvisionedPackage -online | |
# remove Metro apps for all user accounts | |
Get-AppxPackage -AllUsers | Remove-AppxPackage | |
# regedt32.exe | |
# Goto HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent | |
# Create a new 32-bit DWORD value named DisableWindowsConsumerFeatures and set its value data to 1 |
Can't open display?
Ensure DISPLAY
is exported and equal to host's DISPLAY
.
$ export DISPLAY=:0
No protocol specified?
let mapping = { | |
福: "blessing" | |
}; | |
let element = document.querySelector("pre"); | |
let chars = [...element.innerText]; | |
element.innerHTML = ""; | |
chars.map((char) => { | |
if ((/[\u4E00-\u9FAF\uFF66-\uFF9D]/).test(char)) { |
I hereby claim:
To claim this, I am signing this object:
mkdir -p notrust/.ssh | |
touch notrust/.ssh/authorized_users | |
useradd -d notrust notrust | |
chown -R notrust:notrust notrust | |
chown root:root notrust | |
chmod 700 notrust/.ssh | |
chmod 644 notrust/.ssh/authorized_users | |
echo 'AllowUsers ... notrust' > /etc/ssh/sshd_config |
from itertools import product | |
def get_neighbors(coordinate): | |
row = ord(coordinate[0]) | |
col = int(coordinate[1:]) | |
return [ | |
make_coordinate(row + x - 1, col + y - 1) | |
for x, y in product(range(3), range(3)) | |
if (x,y) != (1,1) |
This will be the steps to setup my (very opinionated) shell environment. Many things may go wrong (environmental variables, paths, etc), but this could be a great learning opertunity.
Use the man command for help! Man pages are viewed in less
, try
man less
to learn how to navigate them better!
(defmacro se--when-windows (&rest body) | |
(declare (indent 1)) | |
`(when (or (eq system-type 'ms-dos) | |
(eq system-type 'windows-nt) | |
(eq system-type 'cygwin)) | |
,@body)) | |
(se--when-windows | |
(defun se--remove-drive-letter (path) |
First install the nix package manager: https://nixos.org/nix/
Then install the dependencies:
nix-env -f "<nixpkgs>" -iA haskellPackages.ghc
nix-env -f "<nixpkgs>" -iA haskellPackages.cabal-install
nix-env -f "<nixpkgs>" -iA haskellPackages.Agda
cabal update
cabal install ieee