I hereby claim:
- I am mikahanninen on github.
- I am mikahanninen (https://keybase.io/mikahanninen) on keybase.
- I have a public key whose fingerprint is 7A4D 0AA7 F3F9 E5A1 00C0 37DE 7835 F687 1D1E C541
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
## Tiny Syslog Server in Python. | |
## | |
## This is a tiny syslog server that is able to receive UDP based syslog | |
## entries on a specified port and save them to a file. | |
## That's it... it does nothing else... | |
## There are a few configuration parameters. | |
LOG_FILE = 'youlogfile.log' |
#!/bin/sh | |
# Returns the power state of the screen 1 = on, 0 = off | |
getDisplayState() { | |
state=$(adb -s $1 shell dumpsys power | grep mScreenOn= | grep -oE '(true|false)') | |
# If we didn't get anything it might be a pre-lollipop device | |
if [ "$state" = "" ]; then | |
state=$(adb -s $1 shell dumpsys power | grep 'Display Power' | grep -oE '(ON|OFF)') | |
fi |
const syslogserver = require('syslog-server') | |
let fs = require('fs') | |
function main() { | |
let logfile = process.argv[2] | |
if (!logfile) { | |
console.log('Logfile needs to be given as an argument.') | |
return | |
} |
import os | |
from sauceclient import SauceClient | |
from robot.libraries.BuiltIn import BuiltIn | |
username = os.environ.get('SAUCELABS_USERNAME') | |
access_key = os.environ.get('SAUCELABS_ACCESSKEY') | |
sauce_client = SauceClient(username, access_key) | |
def report_sauce_status(name, status, build=None): |
def resultList = [] | |
currentBuildNumber = manager.build.number | |
for (i = (currentBuildNumber - 19); i <= currentBuildNumber; i++) { | |
if (manager.setBuildNumber(i)) { | |
resultList << manager.getResult() | |
} | |
} | |
manager.setBuildNumber(currentBuildNumber) | |
for (i = 0; i < resultList.size(); i++) { |
# see the current limits | |
$ sysctl -a | grep maxproc | |
# increase it | |
$ sudo sysctl -w kern.maxproc=xxxx | |
$ sudo sysctl -w kern.maxprocperuid=xxx | |
# run at startup | |
$ sudo vim /etc/sysctl.conf |
#!/bin/sh | |
echo Install all AppStore Apps at first! | |
# no solution to automate AppStore installs | |
read -p "Press any key to continue... " -n1 -s | |
echo '\n' | |
echo Install and Set San Francisco as System Font | |
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)" | |
echo Install Homebrew, Postgres, wget and cask | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
from RPA.Browser import Browser | |
br = Browser() | |
br.open_chrome_browser('https://www.robocorp.com') | |
br.screenshot() | |
xpath = "//footer//p//a" | |
value = br.get_text(f"xpath:{xpath}") | |
print(xpath, value) |
import logging | |
logging.basicConfig( | |
filename="dev.log", | |
format="%(asctime)s %(name)s %(levelname)-8s %(message)s", | |
level=logging.DEBUG, | |
) |