Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
# -*- coding: utf-8 -*- | |
from django.http import HttpResponseNotFound | |
class AdminSiteSecurizeMiddleware(object): | |
"""Hide admin panel for unprivileged users""" | |
def process_response(self, request, response): | |
""" | |
Return a 404 Not Found page if there is no authenticated user | |
or if user has no enough privileges | |
""" |
import time | |
import subprocess | |
import datetime | |
""" | |
This class is used to execute a subprocess including a watchdog | |
""" | |
class Subprocess(object): | |
def __init__(self, cmd, cwd=None, stdout=None): | |
self.cmd = cmd |
/** | |
* Arduino ESP8266 telnet server with some ansi experiments | |
* @author: shawn_a | |
*/ | |
#include <ESP8266WiFi.h> | |
#include <Arduino.h> | |
/* Set these to your desired AP credentials. */ | |
const char *APssid = "ESPap"; |
body { counter-reset: h1counter h2counter h3counter h4counter h5counter h6counter; } | |
h1 { counter-reset: h2counter; } | |
h2 { counter-reset: h3counter; } | |
h3 { counter-reset: h4counter; } | |
h4 { counter-reset: h5counter; } | |
h5 { counter-reset: h6counter; } | |
h6 {} | |
h2:before { |
import socket | |
import ssl | |
from tls_server import HOST as SERVER_HOST | |
from tls_server import PORT as SERVER_PORT | |
HOST = "127.0.0.1" | |
PORT = 60002 | |
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |