Målgruppen för dokumentet är främst den som arbetar med nyhetsrapportering om militär aktivitet.
Undvik | Använd |
---|---|
Krigsföring | Krigföring |
En expert som i närtid förekommit ofta i public service presenteras konsekvent där som "doktor i krigsföring".
(function findElementsByContent(content, els) { | |
function recurse(node) { | |
if (node.innerHTML === content) { | |
els.push(node); | |
} | |
for (const child of node.children) { | |
recurse(child); | |
} | |
} |
function pick<T>(array: T[]): T { | |
return array[Math.floor(Math.random() * array.length)]; | |
} | |
function replaceAt(string: string, index: number, replacement: string) { | |
return ( | |
string.substr(0, index) + | |
replacement + | |
string.substr(index + replacement.length) | |
); |
#!/usr/bin/env node | |
const cp = require("child_process"); | |
const fs = require("fs"); | |
const colors = { | |
reset: "\x1b[0m", | |
bright: "\x1b[1m", | |
dim: "\x1b[2m", | |
underscore: "\x1b[4m", | |
blink: "\x1b[5m", |
#!/bin/bash | |
open https://i.imgur.com/M3DPod4.gif | |
git "$@" | |
(echo $(($(cat ~/.itcount) + 1)) > ~/.itcount) 2>/dev/null | |
echo "" | |
echo "You were visited by the spoopy clown 🤡" | |
echo "There have been >> `cat ~/.itcount` << clown-related incidents" |
#!/usr/bin/env node | |
const spongebob = str => [...str].map((c, i) => c[`toLocale${['Lower', 'Upper'][i % 2]}Case`]()).join(''); | |
if (process.argv.length < 3) { | |
console.error(`Usage: ${process.argv[1]} FUNNY TEXT HERE`) | |
process.exit(1); | |
} | |
console.log(spongebob(process.argv.slice(2).join(' '))); |
#!/bin/bash | |
if [ $# -ne 1 ]; then | |
echo 1>&2 "Usage: $0 domainname" | |
exit 1 | |
fi | |
DOMAIN=$1 | |
export DEBIAN_FRONTEND=noninteractive | |
set -e |
const uuid = require('uuid/v1'); | |
const crypto = require('crypto'); | |
const fs = require('fs'); | |
const myPrivateKey = fs.readFileSync('PATH_TO_YOUR_PRIVATE_KEY.pem', 'utf8'); | |
const providerPublicKey = fs.readFileSync('PATH_TO_TRUSTLY_PUBLIC_KEY.pem', 'utf8'); | |
const apiVersion = '1.1'; | |
const request = (method, params) => ((uuid) => ({ | |
method, |
#!/usr/bin/python | |
import os, subprocess | |
from pushbullet import Pushbullet | |
PUSHBULLET_API_KEY = "your_pushbullet_api_key" | |
def getIpFromFile(): | |
with open(os.path.expanduser("~/.externalip"), "r") as f: | |
return f.read().strip() |
console.log( | |
[...Array(100).keys()].map(n => n + 1).map(n => | |
(n % 3 ? "" : "Fizz") + (n % 5 ? "" : "Buzz") || n | |
).join("\n")); |