This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.forms.widgets import DateInput as DjangoDateInput | |
| from django.utils.timezone import now | |
| class DateInput(DjangoDateInput): | |
| """Custom select date widget.""" | |
| input_type = "date" | |
| year_start = 2020 | |
| offset_years = 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Path = require('path'), | |
| NodeExternals = require('webpack-node-externals'), | |
| Copy = require('copy-webpack-plugin'), | |
| Obfuscator = require('webpack-obfuscator') | |
| module.exports = { | |
| context: __dirname, | |
| mode: 'production', | |
| target: 'electron-main', | |
| entry: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Text utils.""" | |
| def strip_bom(value): | |
| """Strip Byte Order Mark from UTF-8 text.""" | |
| return value.encode("utf-8").decode("utf-8-sig") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Django storages.""" | |
| from django.core.files.storage import FileSystemStorage | |
| class FileSystemOverwriteStorage(FileSystemStorage): | |
| """A file system storage with file overwriting capabilities.""" | |
| def get_available_name(self, name, max_length=None): | |
| """Return the available name.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Django filters.""" | |
| from django.contrib.admin import SimpleListFilter | |
| class ArrayFieldListFilter(SimpleListFilter): | |
| """An admin list filter for ArrayFields.""" | |
| def lookups(self, request, model_admin): | |
| """Return the lookups.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FieldPermissionsMixin: | |
| """ | |
| Define a mixin handling read-only fields per group, admin model and form type. | |
| !!!THIS IS JUST A DRAFT, AWAITING COMPLETION!!! | |
| Read-only fields can be specified in a setting exemplified below. | |
| For permission names, codenames without the model name are considered well-formed. | |
| GROUPS = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Requirements: | |
| # - a model with `file`and `thumbnail` fields. | |
| # - the smartcrop module for Python https://github.com/smartcrop/smartcrop.py | |
| @admin.register(MyModel) | |
| class MyModelAdmin(admin.ModelAdmin): | |
| """Set MyModel Admin.""" | |
| formset = MyModelFormset | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Define Django Response Mock.""" | |
| import json | |
| from django.conf import settings | |
| from django.utils.translation import gettext_lazy as _ | |
| class ResponseMock: | |
| """Define response mock.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function selectRightmostSheet() | |
| { | |
| var spreadsheet = SpreadsheetApp.getActiveSpreadsheet() | |
| var sheets = spreadsheet.getSheets() | |
| spreadsheet.setActiveSheet(sheets[sheets.length-1]) | |
| } | |
| selectRightmostSheet() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var input = '[section][lang]Web writing (EN / IT / FR)[y]A lot[/y][/lang][/g][g Tools][lang]Git, AngularJS, GruntJS, Bower, Bash[y]A lot[/y][/lang][lang]Photoshop, Illustrator, InDesign[y]A lot[/y][/lang][/g][/section][p][i]Head in the clouds and feet on the ground web technologies enthusiast, with 6+ years across the web product value chain, aiming at 0 pending emails a day.[/i][/p][p]Hands-on practice across all web dev layers and in all stages of the web product Agile lifecycle, in Euro/regional institutions and private media agencies. Specific strengths:[/p] [*]API-first thinker[/*] [*]mixed technical/design skills[/*] [*]coolheadedness[/*] [*]stakeholder convergence and allocation[/*] [*]brand oriented/redundancy allergic view.[/*][p]Check out my full [a docs/niccolo_mineo_cv.pdf|résumé].[/p][q]The personal qualities and technical skills of Niccolò, as well as his ability to adapt to a multinational and multilingual environment, have made it very easy to integrate him in a well established team. We are s |