Skip to content

Instantly share code, notes, and snippets.

View mikhdm's full-sized avatar

Dmitrii Mikhailenko mikhdm

  • Textkernel B. V.
  • Amsterdam, Netherlands
  • 22:18 (UTC +02:00)
  • LinkedIn in/mikhdm
View GitHub Profile
@subfuzion
subfuzion / curl.md
Last active September 23, 2024 15:27
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.

@homm
homm / django_orm_iterators.py
Last active September 3, 2020 09:49
Memory-efficient task runner for threaded execution. Requires https://pypi.python.org/pypi/futures or python 3.2
from django.db import connections, DEFAULT_DB_ALIAS
def real_queryset_iterator(qs, pk='pk', chunk_size=5000):
qs = qs.order_by(pk)
if pk.startswith('-'):
pk = pk[1:]
lookup = pk + '__lt'
else:
lookup = pk + '__gt'
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#