Skip to content

Instantly share code, notes, and snippets.

@ricpol
ricpol / Python_Windows.md
Last active October 28, 2024 12:48
Come installare e usare Python su Windows

**NOTA IMPORTANTE Questi appunti sono ormai molto datati e incompleti. Li lascio qui per ragioni storiche e affettive, ma davvero, non prendeli alla lettera e non sorprendetevi se ci sono cose sbagliate. Il mio libro Python in Windows parla di tutte queste cose, e di molto altro ancora, in modo più aggiornato, completo e corretto. Vi suggerisco almeno di scaricare il capitolo introduttivo gratuito per farvi un'idea degli argomenti trattati. **

Come installare e usare Python su Windows.

Questi appunti descrivono come installare Python su Windows in modo da creare un ambiente di lavoro sano, facile da usare all'inizio e che possa durare nel tempo senza sfuggirvi di mano quando le cose si fanno più complicate.

Per prima cosa, chiariamo: installare Python su Windows non è per niente complicato di per sé. Potete andare sul sito, scaricare, installare in pochi secondi e cominciare subito a lavorare. All'inizio non avrete difficoltà. Quando prim

@kekru
kekru / Docker connect to remote server.md
Last active March 21, 2025 01:29
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

@MichaelPote
MichaelPote / himawari.ps1
Created February 3, 2016 19:11
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
@leandrotoledo
leandrotoledo / main.py
Last active February 2, 2024 00:08
Webhook using self-signed certificate and Flask (with python-telegram-bot library)
#!/usr/bin/env python
'''Using Webhook and self-signed certificate'''
# This file is an annotated example of a webhook based bot for
# telegram. It does not do anything useful, other than provide a quick
# template for whipping up a testbot. Basically, fill in the CONFIG
# section and run it.
# Dependencies (use pip to install them):
# - python-telegram-bot: https://github.com/leandrotoledo/python-telegram-bot
@manrajgrover
manrajgrover / Selenium_Python_Fb_Wall_Poster
Created January 30, 2015 12:59
Selenium script to log in to Facebook and post on wall
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.common.exceptions import NoSuchElementException
@wteuber
wteuber / locale_yaml_formatter.rb
Last active April 18, 2019 12:34
Sort your rails locale yamls alphabetically and adds an empty line when indent lowers 2 or more levelsPrints everything to stdout. Watch your yaml anchors and aliases (fix manually, if needed).usage: chmod +x ./locale_yaml_formatter.rb ./locale_yaml_formatter.rb <path/to/locale.yml>In a rails project, runfind . -type f -name *.yml | grep -v spec…
#!/usr/bin/env ruby
# Sort your rails locale yamls alphabetically and adds an empty line when indent lowers 2 or more levels
# Prints everything to stdout. Watch your yaml anchors and aliases (fix manually, if needed).
# usage:
# chmod +x ./locale_yaml_formatter.rb
# ./locale_yaml_formatter.rb <path/to/locale.yml>
#
# In a rails project, run
# find . -type f -name *.yml | grep -v spec | grep locales | _