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 subprocess | |
import json | |
def run_axfr_query(name_server, domain): | |
# Run the AXFR query using dig | |
command = f"dig @{name_server} {domain} AXFR +noall +answer" | |
output = subprocess.check_output(command, shell=True, universal_newlines=True) | |
# Parse the output and create the JSON dictionary | |
records = {} |
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/bash | |
# This script helps with getting Frappe/ERPNext running quickly using | |
# the upstream Compose specifications. Not intended for production. | |
# | |
# Usage: | |
# | |
# $ git clone https://github.com/frappe/frappe_docker | |
# $ cd frappe_docker | |
# $ curl -Lo erpnext.sh <URL to this raw gist> | |
# |
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
# Example usage | |
# | |
# $ cp Dockerfile .config/nvim | |
# $ docker build .config/nvim -t mynvim | |
# | |
# # in your .bashrc or .bash_aliases | |
# nvim() { | |
# docker run -it \ | |
# --network host \ | |
# -v ~/.ssh:/home/me/.ssh:ro \ |
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
2019/10/30 17:14:16 Unknown opcode 2016 | |
panic: runtime error: invalid memory address or nil pointer dereference | |
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x508d38] | |
goroutine 23 [running]: | |
github.com/hanwen/go-fuse/fuse.(*request).serializeHeader(0x400008c000, 0x0, 0x28, 0x0, 0x0) | |
github.com/hanwen/go-fuse/fuse/request.go:212 +0x20 | |
github.com/hanwen/go-fuse/fuse.(*Server).write(0x40000a0000, 0x400008c000, 0x0) | |
github.com/hanwen/go-fuse/fuse/server.go:462 +0x58 | |
github.com/hanwen/go-fuse/fuse.(*Server).handleRequest(0x40000a0000, 0x400008c000, 0x400008c000) |
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
Oct 29 23:34:49 rock64 gocryptfs[3838]: go-fuse: Unknown opcode 2016 | |
Oct 29 23:34:49 rock64 gocryptfs-3838-logger[3849]: panic: runtime error: invalid memory address or nil pointer dereference | |
Oct 29 23:34:49 rock64 gocryptfs-3838-logger[3849]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x508d38] | |
Oct 29 23:34:49 rock64 gocryptfs-3838-logger[3849]: | |
Oct 29 23:34:49 rock64 gocryptfs-3838-logger[3849]: goroutine 1 [running]: | |
Oct 29 23:34:49 rock64 gocryptfs-3838-logger[3849]: github.com/hanwen/go-fuse/fuse.(*request).serializeHeader(0x400000c240, 0x0, 0x28, 0x0, 0x0) | |
Oct 29 23:34:49 rock64 gocryptfs-3838-logger[3849]: github.com/hanwen/go-fuse/fuse/request.go:212 +0x20 | |
Oct 29 23:34:49 rock64 gocryptfs-3838-logger[3849]: github.com/hanwen/go-fuse/fuse.(*Server).write(0x40000c6000, 0x400000c240, 0x0) | |
Oct 29 23:34:49 rock64 gocryptfs-3838-logger[3849]: github.com/hanwen/go-fuse/fuse/server.go:462 +0x58 | |
Oct 29 23:34:49 rock64 gocryptfs-3838-logger[3849]: github.com/hanwen/go-fuse/f |
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
<opml version="1.1"> | |
<body><outline text="YouTube Subscriptions" title="YouTube Subscriptions"><outline text="swallowgames" title="swallowgames" type="rss" xmlUrl="https://www.youtube.com/feeds/videos.xml?channel_id=UCITAdOp3YrDijRkTMpcJplA" /><outline text="Glink" title="Glink" type="rss" xmlUrl="https://www.youtube.com/feeds/videos.xml?channel_id=UCNTqu16j3F6RbtHZI-3untg" /><outline text="NileRed" title="NileRed" type="rss" xmlUrl="https://www.youtube.com/feeds/videos.xml?channel_id=UCFhXFikryT4aFcLkLw2LBLA" /><outline text="Vsauce" title="Vsauce" type="rss" xmlUrl="https://www.youtube.com/feeds/videos.xml?channel_id=UC6nSFpj9HTCZ5t-N3Rm3-HA" /><outline text="celldweller" title="celldweller" type="rss" xmlUrl="https://www.youtube.com/feeds/videos.xml?channel_id=UCpDmAxyuLoNrP-cek8tEfrw" /><outline text="DONG" title="DONG" type="rss" xmlUrl="https://www.youtube.com/feeds/videos.xml?channel_id=UClq42foiSgl7sSpLupnugGA" /><outline text="SuperExtraBuns" title="SuperExtraBuns" type="rss" xmlUrl="https://www.yout |
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
#! /usr/bin/env python | |
# script for ubnt device discovery | |
# Usage: python discover.py or ./discover.py | |
import socket | |
from contextlib import closing | |
PORT=40860 |
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
-- Assuming Logblock Database = logblock, table = lb-world, Prism Database = minecraft | |
-- For versions prior than Prism 2.0 | |
-- sign-text | |
INSERT INTO `minecraft`.`prism_actions` (action_time,action_type,player,world,x,y,z,data) | |
SELECT `logblock`.`lb-world`.date, "sign-change", `logblock`.`lb-players`.playername, "world", `logblock`.`lb-world`.x, `logblock`.`lb-world`.y, `logblock`.`lb-world`.z, | |
CONCAT('{"block_id":',`logblock`.`lb-world`.type,',"block_subid":',`logblock`.`lb-world`.data, ',"lines":["', | |
SUBSTRING_INDEX(SUBSTRING_INDEX(`logblock`.`lb-world-sign`.signtext, '\0', 1), '\0', -1), '","', -- line 1 | |
SUBSTRING_INDEX(SUBSTRING_INDEX(`logblock`.`lb-world-sign`.signtext, '\0', 2), '\0', -1), '","', -- line 2 | |
SUBSTRING_INDEX(SUBSTRING_INDEX(`logblock`.`lb-world-sign`.signtext, '\0', 3), '\0', -1), '","', -- line 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
import com.sk89q.commandbook.CommandBook; | |
import com.sk89q.commandbook.util.PlayerUtil; | |
import com.sk89q.minecraft.util.commands.Command; | |
import com.sk89q.minecraft.util.commands.CommandContext; | |
import com.sk89q.minecraft.util.commands.CommandException; | |
import com.sk89q.minecraft.util.commands.CommandPermissions; | |
import com.zachsthings.libcomponents.ComponentInformation; | |
import com.zachsthings.libcomponents.bukkit.BukkitComponent; | |
import java.util.ArrayList; | |
import java.util.Collection; |
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
private static String[] RVALS = {"M", "CM", "D", "CD", "C", "XC", "L", | |
"XL", "X", "IX", "V", "IV", "I"}; | |
private static int[] IVALS = {1000, 900, 500, 400, 100, 90, | |
50, 40, 10, 9, 5, 4, 1}; | |
public static String toRomanNumeral(int value) { | |
if (value >= 4000 || value <= 0) return ""; | |
String roman = ""; | |
for (int i = 0; i < RVALS.length; i++) { |
NewerOlder