Skip to content

Instantly share code, notes, and snippets.

View Nocks's full-sized avatar
🌍
Working remotely

Enock Kwesi Addey Nocks

🌍
Working remotely
View GitHub Profile
@Nocks
Nocks / media-query.css
Created August 27, 2019 00:20 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@Nocks
Nocks / install virtualenv ubuntu 16.04.md
Created March 16, 2021 15:02 — forked from Geoyi/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@Nocks
Nocks / weasyprint_complex_headers.py
Created September 22, 2021 03:34 — forked from pikhovkin/weasyprint_complex_headers.py
Repeat on each page of complex headers (eg, tables) except the first page
# coding: utf-8
from weasyprint import HTML, CSS
def get_page_body(boxes):
for box in boxes:
if box.element_tag == 'body':
return box
@Nocks
Nocks / workbook.md
Created March 21, 2022 00:06 — forked from leisurelicht/workbook.md
Export queryset to Excel workbook
from django.http import HttpResponse
from .utils import queryset_to_workbook

def download_workbook(request):
    queryset = User.objects.all()
    columns = (
        'first_name',
        'last_name',
        'email',