Skip to content

Instantly share code, notes, and snippets.

View josedaudi's full-sized avatar
🇹🇿
Focusing

Joseph Daudi josedaudi

🇹🇿
Focusing
View GitHub Profile
@josedaudi
josedaudi / keybase.md
Created January 18, 2021 04:23
keybase.md

Keybase proof

I hereby claim:

  • I am josedaudi on github.
  • I am josedaudi (https://keybase.io/josedaudi) on keybase.
  • I have a public key whose fingerprint is 76B8 D8B4 CBB3 6497 73C6 023B F40D 0E91 5E9B 645E

To claim this, I am signing this object:

@josedaudi
josedaudi / Activate Office 2019 for macOS VoL.md
Created November 15, 2019 04:05 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@josedaudi
josedaudi / install_python3.6_opensuse42.3.sh
Created May 17, 2018 12:13 — forked from amoilanen/install_python3.6_opensuse42.3.sh
Installing Python 3.6 on OpenSUSE Leap 42.3
# !/bin/bash
# Step 1. Install pyenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
# Step 2. Install missing headers for all the Python modules to be built
@josedaudi
josedaudi / multiple_select_field.py
Created January 27, 2018 15:09 — forked from kottenator/multiple_select_field.py
Django's multiple-choice model field with static choices
"""
Field with multiple *static* choices (not via m2m)
Value is stored in DB as comma-separated values
Default widget is forms.CheckboxSelectMultiple
Python value: list of values
Original Django snippet: https://djangosnippets.org/snippets/1200/
It's 6 years old and doesn't work with latest Django
Also it implements 'max_choices' functionality - I have removed it for simplicity
@josedaudi
josedaudi / django_multiforms_view.py
Created December 24, 2017 14:35 — forked from imomaliev/django_multiforms_view.py
Django multiple forms CBV
# coding: utf-8
from __future__ import unicode_literals, absolute_import
from django.http.response import HttpResponseForbidden, HttpResponseRedirect
from django.views.generic.base import TemplateResponseMixin, ContextMixin
from django.views.generic.edit import ProcessFormView
class MultiFormMixin(ContextMixin):
@josedaudi
josedaudi / extract_emails_from_text.py
Created December 24, 2017 10:12 — forked from dideler/example.md
A python script for extracting email addresses from text files. You can pass it multiple files. It prints the email addresses to stdout, one address per line. For ease of use, remove the .py extension and place it in your $PATH (e.g. /usr/local/bin/) to run it like a built-in command.
#!/usr/bin/env python
#
# Extracts email addresses from one or more plain text files.
#
# Notes:
# - Does not save to file (pipe the output to a file if you want it saved).
# - Does not check for duplicates (which can easily be done in the terminal).
#
# (c) 2013 Dennis Ideler <ideler.dennis@gmail.com>