Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kamilion's full-sized avatar

Kamilion kamilion

View GitHub Profile
@kamilion
kamilion / dnsupdate.py
Last active December 19, 2015 10:49 — forked from pklaus/dnsupdate.py
A little script I've been fixing up to do DNS updates remotely.
#!/usr/bin/env python2.7
# Matt's DNS management tool
# Manage DNS using DDNS features
#
# See http://planetfoo.org/blog/archive/2012/01/24/a-better-nsupdate/
#
# Usage: dnsupdate -s server -k key -t ttl add _minecraft._tcp.mc.example.com SRV 0 0 25566 mc.example.com.
# -h HELP!
# -s the server
# -k the key
from base_plugin import SimpleCommandPlugin
from utility_functions import give_item_to_player
from plugins.core.player_manager import permissions, UserLevels
from time import time
class FuelGiver(SimpleCommandPlugin):
"""
Welcomes new players by giving them fuel to leave the spawn world.
"""
#!/usr/bin/env python2.7
from __future__ import print_function
from __future__ import unicode_literals
# System imports
import string
import sh
import re
import sys
#!/usr/bin/env python
# SLLabs.com vif hotplug script
# Copyright (C) 2013 SLLabs.com <support@sllabs.com>
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
# Written in 2013 for Kamilion@SLLabs.com by ircs://irc.ospnet.org/#sllabs residents
# "If you have an apple and I have an apple and we exchange these apples
# then you and I will still each have one apple.
[
{
"attr_failed_past": 0 ,
"attr_failing": 0 ,
"bad_sectors": 0 ,
"boot_id": "09abaf1f-8fc1-4f46-943d-425e8fbd092d" ,
"device_name": "sdy" ,
"device_node": "/dev/sdy" ,
"disk_failing": false ,
"disk_information": {
[{"attr_failed_past":0,"attr_failing":0,"bad_sectors":0,"boot_id":"09abaf1f-8fc1-4f46-943d-425e8fbd092d","device_name":"sdy","device_node":"/dev/sdy","disk_failing":false,"disk_information":{"ata_security":"Disabled, NOT FROZEN [SEC1]","capacity":"250,059,350,016 bytes [250 GB]","model":"Hitachi HTE723225A7A364","model_family":"Unknown Model Family","phy_protocol":"SATA","serial_no":"E18G4263CNRA7D"},"host_information":{"boot_id":"09abaf1f-8fc1-4f46-943d-425e8fbd092d","device_name":"sdy","device_node":"/dev/sdy","host_ip":"10.0.5.50","last_boot_id":"09abaf1f-8fc1-4f46-943d-425e8fbd092d","last_host_ip":"10.0.5.50","last_known_as":"/dev/sdy","last_machine_id":"300a76492cf73e527d61b3e849efde1b","machine_id":"300a76492cf73e527d61b3e849efde1b"},"host_ip":"10.0.5.50","id":"04d7c2ff-c2d3-410a-878f-d2577f63c55f","lifetime":68400,"machine_id":"300a76492cf73e527d61b3e849efde1b","model":"Hitachi HTE723225A7A364","self_test_percent_left":0,"self_test_status":"success","serial_no":"E18G4263CNRA7D","smart_blocks":{"block_s
@kamilion
kamilion / reobj.py
Last active August 29, 2015 14:08
ReOBJ
__author__ = 'Kamilion@gmail.com'
########################################################################################################################
# Imports
########################################################################################################################
# Make sure when we're blindly imported, only our defined classes get imported.
__all__ = ['ReOBJ', 'ReOBJConnPool']
# We should do logging, right?
# import logging
# Remember to replace print calls with logging calls.

Keybase proof

I hereby claim:

  • I am kamilion on github.
  • I am kamilion (https://keybase.io/kamilion) on keybase.
  • I have a public key whose fingerprint is 7683 DF81 2942 1AC5 FB63 65E7 0049 B3A6 32F9 69AF

To claim this, I am signing this object:

__author__ = 'Kamilion@gmail.com'
########################################################################################################################
## Imports
########################################################################################################################
# Flask imports
from flask import g
# rethink imports
import rethinkdb as r
@kamilion
kamilion / diskaction.py
Created November 17, 2015 03:39
diskaction, a utility to wipe or image disks. Contact me for it's imports...
#!/usr/bin/env python
import os
import sys
import sh
import string
from time import time
from optparse import OptionParser
# RethinkDB imports