Skip to content

Instantly share code, notes, and snippets.

@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active April 25, 2024 01:09
crack activate Office on mac with license file
@wronk
wronk / python_environment_setup.md
Last active November 27, 2023 16:18
Setting up your python development environment (with pyenv, virtualenv, and virtualenvwrapper)

Overview of Python Virtual Environments

This guide is targetted at intermediate or expert users who want low-level control over their Python environments.

When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. This helps keep each workflow in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. The guide here covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda). See the Using the workflow section to view the end result.


h/t @sharkinsspatial for linking me to the perfect cartoon

@josegonzalez
josegonzalez / redis_migrate.py
Last active April 25, 2024 02:34 — forked from iserko/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
@Nagyman
Nagyman / workflows-in-django.md
Last active January 27, 2024 08:29
Workflows in Django

Workflows (States) in Django

I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.

Common Software Uses

  • Publishing (Draft->Approved->Published->Expired->Deleted)
@kaizhu256
kaizhu256 / gist:4482069
Last active October 20, 2021 16:25
javascript - very fast and simple uuid4 generator benchmarked on http://jsperf.com/uuid4/8
/*jslint bitwise: true, indent: 2, nomen: true, regexp: true, stupid: true*/
(function () {
'use strict';
var exports = {};
exports.uuid4 = function () {
//// return uuid of form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
var uuid = '', ii;
for (ii = 0; ii < 32; ii += 1) {