Skip to content

Instantly share code, notes, and snippets.

@kaito834
kaito834 / urllib-request-Request.py
Last active July 19, 2023 23:37
Python 3: urllib.request and json sample
#!/usr/bin/env python
#
# tested by Python 3.4.3 on Windows 8.1
# Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32
# If you need to access web site/service via proxy, set http_proxy or https_proxy.
# https://docs.python.org/3/library/urllib.request.html#urllib.request.ProxyHandler
# set http_proxy=http://127.0.0.1:8888/
# set https_proxy=https://127.0.0.1:8888/
@kaito834
kaito834 / robocopy.bat
Created March 15, 2015 14:01
Backup files to remote folder by robocopy on Windows 8.1
REM Copy local folder to remote folder
REM I executed this batch on Windows 8.1
robocopy "C:\Users\sample\Documents\mydata" "\\192.168.0.120\backup\" /E /FFT /R:3 /W:5 /NP /TEE /LOG+:"\\192.168.0.120\backup\robocopy.log"
@kaito834
kaito834 / KeePass-export.bat
Last active August 29, 2015 14:17
Export some Entries from KeePass KDBX(2.x) file by KPScript
@echo off
setlocal
set originalKdbxFile=KeePass\myDatabase.kdbx
set exportedKdbxFile=KeePass\myDatabaseProtableGroup.kdbx
REM ToDo: mask password on command prompt by Powershell
REM https://gallery.technet.microsoft.com/scriptcenter/59807ef4-f17a-4a12-a389-f9bb407c4e5a
set /P originalKdbxFile_pass="%originalKdbxFile% password: "
set /P exportedKdbxFile_pass="%exportedKdbxFile% password: "