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 re | |
from easysnmp import Session | |
from pprint import pprint | |
from struct import pack, unpack | |
printer_ip = "10.0.0.222" | |
session = Session(hostname=printer_ip, community="public", version=1, timeout=1) | |
password = [74, 54] |
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
// Thanks http://stackoverflow.com/questions/1638337/the-best-way-to-synchronize-client-side-javascript-clock-with-server-date | |
var serverTimeOffset = false; | |
function getServerTime(callback) { | |
if (serverTimeOffset === false) { | |
var scripts = document.getElementsByTagName("script"), | |
URL = scripts[scripts.length - 1].src; | |
var clientTimestamp = Date.parse(new Date().toUTCString()); |
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
<?php | |
class Widget_Name extends WP_Widget { | |
function Widget_Name() { | |
$widget_opts = array( | |
'classname' => 'your-awesome-class', | |
'description' => 'Your awesome Description', | |
); | |