Skip to content

Instantly share code, notes, and snippets.

@shabanovtg
shabanovtg / web-servers.md
Created December 24, 2020 09:37 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@shabanovtg
shabanovtg / redis_migrate.py
Created July 27, 2018 15:05 — forked from josegonzalez/redis_migrate.py
A simple script to migrate all keys from one Redis to another
#!/usr/bin/env python
import argparse
import redis
def connect_redis(conn_dict):
conn = redis.StrictRedis(host=conn_dict['host'],
port=conn_dict['port'],
db=conn_dict['db'])
return conn
@shabanovtg
shabanovtg / cms
Last active December 29, 2016 12:09
вариант 1:
содержание
{{block type="core/template" name="cms" template="page/cms-lift-active.phtml"}}
xml
<reference name="root">
<action method="addBodyClass">
<class>cms-lift-active</class>
</action>