arp-scan --localnet
du -h
cat /path/to/file.txt | grep -o -P '.{0,3}string-to-match.{0,10}'
$serverAddress = "1.1.1.1" | |
$userName = "user" | |
$securePassword = ConvertTo-SecureString -AsPlainText -Force -String "password" | |
$credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $userName,$securePassword | |
$session = New-PSSession -ComputerName $serverAddress -Credential $credentials | |
Invoke-Command -Session $session -ScriptBlock { | |
Write-Host "hello world" | |
} |
import requests | |
requests.post('http://{}/job/{}/buildWithParameters?{}={}'.format( | |
jenkins_url, | |
job_name, | |
parameter_name, | |
parameter_value | |
)) |
Make these changes in the cassandra.yaml
config file:
start_rpc: true
rpc_address: 0.0.0.0
broadcast_rpc_address: [node-ip]
listen_address: [node-ip]
.pypirc
in home folderpython setup.py sdist
in repo dirtwine upload dist/*
in repo dirEncrypt your PyPi password using:
echo -n "password1" | travis encrypt --add deploy.password
in your root dir.
.travis.yml
language: python
python:
import argparse | |
import datetime | |
import time | |
def date(arg): | |
return datetime.date.fromtimestamp(time.mktime(time.strptime(arg, '%d/%m/%Y'))) | |
if __name__ == '__main__': |
import falcon | |
import waitress | |
import json | |
class HelloWorldResource: | |
def on_post(self, req, resp): | |
content = req.stream.read().decode() | |
if content == 'spam': | |
resp.body = json.dumps('eggs') |
set tabstop=4 shiftwidth=4 expandtab | |
set number | |
autocmd Filetype go setlocal ts=4 sw=4 sts=0 noexpandtab | |
set nocompatible | |
filetype off | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize |