How to implement a custom search for Hugo usig Gruntjs and Lunrjs.
Install the following tools:
<?php | |
/** | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |
console.log("got here"); | |
var page = require('webpage').create(); | |
page.onConsoleMessage = function(msg) { | |
console.log(msg); | |
}; | |
page.open("http://facebook.com", function(status) { | |
if ( status === "success" ) { |
// Takes a URL, param name, and data string | |
// Sends to the server.. The server can respond with binary data to download | |
jQuery.download = function(url, key, data){ | |
// Build a form | |
var form = $('<form></form>').attr('action', url).attr('method', 'post'); | |
// Add the one key/value | |
form.append($("<input></input>").attr('type', 'hidden').attr('name', key).attr('value', data)); | |
//send request | |
form.appendTo('body').submit().remove(); |
import xmlrpclib | |
s = xmlrpclib.ServerProxy('http://localhost:9900') | |
print s.uptime() | |
users = s.users() | |
for user in users: | |
for login in users[user]: | |
print user, login |
# vim: tabstop=4 shiftwidth=4 softtabstop=4 | |
#!/usr/bin/python | |
import sys | |
import time | |
import logging | |
from daemon import runner | |
# | |
# An example daemon main logic application class. | |
# Just keep writing timestamps to a log file periodically. | |
# |
import java.io.InputStreamReader; | |
import java.io.Reader; | |
import java.io.BufferedReader; | |
import java.io.InputStream; | |
import java.net.URL; | |
import java.net.URLConnection; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.HttpsURLConnection; | |
import javax.net.ssl.SSLContext; |
# Generate a passphrase | |
openssl rand -base64 48 > passphrase.txt | |
# Generate a Private Key | |
openssl genrsa -aes128 -passout file:passphrase.txt -out server.key 2048 | |
# Generate a CSR (Certificate Signing Request) | |
openssl req -new -passin file:passphrase.txt -key server.key -out server.csr \ | |
-subj "/C=FR/O=krkr/OU=Domain Control Validated/CN=*.krkr.io" |
import time | |
import os | |
import logging | |
from daemon.runner import DaemonRunner | |
_base_path = "/path/to/daemon" | |
class MyApp(object): | |
""" | |
Define the required attributes |