This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class Focalboard { | |
constructor(url, token, workspaceId) { | |
this.url = url; | |
this.token = token; | |
this.workspaceId = workspaceId; | |
} | |
async allBlocks() { | |
let result = await fetch(`${this.url}/api/v1/workspaces/${this.workspaceId}/blocks?type=view`, { | |
headers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
# Bare basics | |
boot.loader.grub.enable = true; | |
boot.loader.grub.version = 1; | |
boot.loader.grub.extraPerEntryConfig = "root (hd0)"; | |
boot.loader.grub.device = "nodev"; | |
boot.initrd.kernelModules = [ "xen_blkfront" ]; | |
fileSystems."/boot".fsType = "ext2"; | |
fileSystems."/boot".device = "/dev/xvda"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# Install the binary tarball... | |
cd / | |
wget -O - http://hydra.nixos.org/job/nix/trunk/binaryTarball.x86_64-linux/latest/download | tar xvj | |
/usr/bin/nix-finish-install | |
rm /usr/bin/nix-finish-install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" | |
# Add the Docker repository to your apt sources list. | |
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ | |
> /etc/apt/sources.list.d/docker.list" | |
# update | |
sudo apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ps aux | |
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | |
root 1 0.0 0.1 30600 1732 ? Ss May22 0:02 systemd --log-target=journal | |
root 2 0.0 0.0 0 0 ? S May22 0:00 [kthreadd] | |
root 3 0.0 0.0 0 0 ? S May22 0:01 [ksoftirqd/0] | |
root 5 0.0 0.0 0 0 ? S May22 0:00 [kworker/u:0] | |
root 6 0.0 0.0 0 0 ? S May22 0:02 [migration/0] | |
root 7 0.0 0.0 0 0 ? S May22 0:02 [migration/1] | |
root 9 0.0 0.0 0 0 ? S May22 0:00 [ksoftirqd/1] | |
root 11 0.0 0.0 0 0 ? S< May22 0:00 [cpuset] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parent(a, b) -> | |
string(a), | |
string(b). | |
ancestor(a, b) -> | |
string(a), | |
string(b). | |
ancestor(a, c) <- | |
parent(a, b). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isEven(a) { | |
a = a.toString().replace(/[^0-9.]/g, ""); | |
var stack = []; | |
var rev = a.split('').reverse(); | |
for (var ix = 0; ix < rev.length; ix++) { | |
if (rev[ix] == ".") stack.push("dot") | |
else if (rev[ix] == "1" || rev[ix] == "3" || rev[ix] =="5" || rev[ix] == "7" || rev[ix] == "9") | |
stack.push("oneven") | |
else | |
stack.push('even') |
NewerOlder