Skip to content

Instantly share code, notes, and snippets.

@subfuzion
subfuzion / curl.md
Last active November 17, 2024 03:54
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@nokimaro
nokimaro / weather.md
Last active December 24, 2023 03:47
API для погоды
@cpatulea
cpatulea / gist:7394412
Created November 10, 2013 05:59
Find Python string literals that should probably be Unicode
#!/usr/bin/python
import ast, _ast, os
for root, dirs, files in os.walk('.'):
for name in files:
if name.endswith('.py'):
full = os.path.join(root, name)
t = ast.parse(open(full).read())
for n in ast.walk(t):
if isinstance(n, _ast.Str) and not isinstance(n.s, unicode):
@smola
smola / poswap.py
Created September 17, 2013 21:18
A Python script for swaping source and target language on a Gettext PO file.
#!/usr/bin/env python
# poswap.py
#
# Copyright (C) 2013 Santiago M. Mola
# Released under the terms of the MIT License.
#
"""
Swaps the source and target language in a Gettext PO file.
Learn more at http://mola.io/2013/09/17/swapping-languages-in-gettext-po-file
@Nurdok
Nurdok / python_conversion.md
Last active July 11, 2024 15:00
Python Conversion

Python Number Conversion Chart

From To Expression