- copy the autostart
cp /etc/xdg/lxsession/LXDE-pi/autostart ~/.config/lxsession/LXDE-pi/
input { | |
beats { | |
port => 5044 | |
} | |
tcp { | |
port => 5000 | |
} | |
} |
import time | |
import sys | |
from flask import Flask | |
from flask import request | |
NULL_CHAR = chr(0) | |
EOL_SEQ = NULL_CHAR*5 | |
RELEASE_SEQ = NULL_CHAR*8 | |
KEYMAP = { |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServer | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-CommonHttpFeatures | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpErrors | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpRedirect | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ApplicationDevelopment | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility45 | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HealthAndDiagnostics | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpLogging | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-LoggingLibraries |
Function Compress-Images() { | |
if(!(Test-Path -Path "Compressed")) { | |
New-Item -ItemType Directory -Force -Path "Compressed" | |
} | |
if((Get-Command "guetzli_windows_x86-64.exe" -ErrorAction SilentlyContinue) -eq $null) { | |
Write-Host "Could not find guetzli_windows_x86-64.exe in path." | |
} | |
$files = Get-ChildItem -Filter *.jpg |
package main | |
import ( | |
"fmt" | |
"flag" | |
"time" | |
"github.com/fatih/color" | |
) |
// Based on https://gist.github.com/automatonic/3725443 | |
// with added Hash(string input) method and removed (int) cast to | |
// keep the hash unsigned. | |
public static class MurMurHash3 | |
{ | |
//Change to suit your needs | |
const uint seed = 144; | |
public static long Hash(string input) | |
{ |
function getIP(host) { | |
var url = "https://freegeoip.net/json/" + host; | |
var json = UrlFetchApp.fetch(url); | |
var data = JSON.parse(json); | |
return data["ip"]; | |
} |
public class BaseModule : IHttpModule | |
{ | |
private const double Treshold = 5; | |
private string _filePath; | |
public void Init(HttpApplication context) | |
{ | |
_filePath = System.Web.Hosting.HostingEnvironment.MapPath("~/App_Data"); | |
context.PreRequestHandlerExecute += PreRequestHandler; |