from flask import Flask
from flask import request
from flask_json import FlaskJSON, json_response
app = Flask(__name__)
FlaskJSON(app)
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
#!/bin/bash | |
KBD=$(find -L /sys/bus/hid/drivers/razerkbd/ -maxdepth 2 -type f -name device_type -print 2> /dev/null | grep device_type) | |
KBD_DIR=$(dirname ${KBD}) | |
echo ${KBD_DIR} | |
echo "Set keyboard color to E0E0E0" | |
echo -n -e "\xF0\xE0\xE0" > ${KBD_DIR}/matrix_effect_static |
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
from docker:17.06.1-ce | |
ENV CLOUD_SDK_VERSION 171.0.0 | |
ENV PATH /google-cloud-sdk/bin:$PATH | |
RUN apk --no-cache add \ | |
curl \ | |
python \ | |
py-crcmod \ | |
bash \ |
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
with import <nixpkgs> {}; | |
let | |
Scrapy = python35Packages.buildPythonPackage rec { | |
name = "Scrapy-1.3.0"; | |
src = fetchurl { | |
url = "https://pypi.python.org/packages/e1/2d/f54cb2bed5d1d4bbc6ae093842282c8a0daad8c0cd9bf7504fbdf01b657f/Scrapy-1.3.0.tar.gz"; | |
md5 = "605e38a6ed446c9bdef8c0d0f09b8f61"; | |
}; | |
#propagatedBuildInputs = [ python35Packages.pyopenssl python35Packages.lxml python35Packages.service-identity python35Packages.parsel PyDispatcher python35Packages.queuelib python35Packages.twisted python35Packages.attrs w3lib]; |
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
# | |
# Dockerfile with Oracle Java 8. Scala 2.11.8 and scala-sbt 0.13.13 | |
# Based on Ubuntu Xenial | |
# Adapted from https://github.com/dockerfile/java | |
# Maintained by Jozko Skrablin | |
# | |
# Pull base image. | |
FROM ubuntu:xenial |
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
############################################################ | |
# Dockerfile to run https://github.com/univizor/u3 | |
# Based on Alpine | |
############################################################ | |
# Set the base image to Alpine | |
FROM python:3.5-alpine | |
# File Author / Maintainer | |
MAINTAINER Jozko Skrablin |
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
traceroute 213.133.123.142 | |
traceroute to 213.133.123.142 (213.133.123.142), 64 hops max, 52 byte packets | |
1 router.zomg.si (192.168.88.1) 2.323 ms 1.206 ms 4.894 ms | |
2 cpe-31-15-169-1.cable.telemach.net (31.15.169.1) 12.284 ms 2.817 ms 2.243 ms | |
3 gw-ftth-lj.telemach.net (94.140.64.254) 2.246 ms 1.947 ms 3.643 ms | |
4 185.66.148.10.ipv4.telemach.net (185.66.148.10) 8.081 ms 8.050 ms 7.902 ms | |
5 185.66.148.219.ipv4.telemach.net (185.66.148.219) 8.457 ms 7.701 ms 9.056 ms | |
6 185.66.148.217.ipv4.telemach.net (185.66.148.217) 20.103 ms 21.295 ms 17.331 ms | |
7 peer-as31042.sbb.rs (82.117.193.217) 8.322 ms 8.805 ms 10.984 ms | |
8 decix-gw.hetzner.de (80.81.192.164) 23.349 ms 19.841 ms 22.532 ms |
##Prevent local login while allowing ssh login for a user
-
Assumptions:
- Running Ubuntu 12.04/14.04
- Affected user is
foouser
-
Edit
/etc/pam.d/login
and/etc/pam.d/sshd
- uncomment/add following line
account required pam_access.so
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
#!/bin/sh | |
# This script installs the Nix package manager on your system by | |
# downloading a binary distribution and running its installer script | |
# (which in turn creates and populates /nix). | |
{ # Prevent execution if this script was only partially downloaded | |
unpack=nix-binary-tarball-unpack |
NewerOlder