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
FROM ubuntu | |
RUN apt-get update && apt-get install -y netcat-openbsd | |
COPY ./docker-sock-info / | |
COPY ./watcher.sh / | |
RUN chmod +x /watcher.sh | |
CMD /watcher.sh |
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
version: "3" | |
services: | |
loki: | |
image: grafana/loki:2.6.1 | |
command: -config.file=/etc/loki/loki-config.yml | |
ports: | |
- "3100:3100" | |
volumes: | |
- ./loki-config.yml:/etc/loki/loki-config.yml |
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
/** @param {NS} ns **/ | |
export async function main(ns) { | |
const delay = ns.args[1] | |
if (delay) { | |
await ns.sleep(delay) | |
} | |
await ns.hack(ns.args[0]) | |
} |
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
import { Octokit } from "https://cdn.skypack.dev/@octokit/rest"; | |
import { PERSONAL_ACCESS_TOKEN } from "token.js" | |
// Create a token.js with this content | |
// export const PERSONAL_ACCESS_TOKEN = "ghp_abcdef1234567890" | |
/** @param {NS} ns **/ | |
export async function main(ns) { | |
if (ns.args.length == 0) { | |
ns.tprint("Usage: run gists.js file1 file2 file3 ...") |
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
/** @param {NS} ns **/ | |
export async function main(ns) { | |
const delay = ns.args[1] | |
if (delay) { | |
await ns.sleep(delay) | |
} | |
await ns.hack(ns.args[0]) | |
} |
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
// This is generated from bitburner |
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
# requires curl, jq, grep | |
curl -s --head -H "Authorization: Bearer $(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest | grep RateLimit |
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
[my_group] | |
host-1 | |
host-2 | |
host-3 |
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 | |
GITLAB_URL="https://git.acme.com" | |
PRIVATE_TOKEN="abcde-fghijklmnop" | |
FROM_GROUP_ID=$1 | |
TO_GROUP_ID=$2 | |
ACCESS_LEVEL=40 | |
USERIDS_OF_GROUP=$(curl -s --header "PRIVATE-TOKEN: $PRIVATE_TOKEN" $GITLAB_URL/api/v4/groups/$FROM_GROUP_ID/members| jq ".[].id") | |
for USERID in $USERIDS_OF_GROUP |
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
#undef _FOO1 | |
#undef _FOO2 | |
#undef _FOO2 | |
#undef _BAR1 | |
#undef _BAR2 | |
#undef _BAR3 | |
#define _FOO3 42 |
NewerOlder