Skip to content

Instantly share code, notes, and snippets.

@StephenFordham
StephenFordham / MyCustomError.py
Created January 6, 2020 21:35
MyCustomError
class MyCustomError(Exception):
def __init__(self, *args):
if args:
self.message = args[0]
else:
self.message = None
def __str__(self):
print('calling str')
if self.message:
@Akhil-Suresh
Akhil-Suresh / postman_installation.md
Last active July 6, 2024 04:21
Installing Postman on Ubuntu/Debian

Installing Postman

Step 1

If any version of postman is installed we need to remove it

sudo rm -rf /opt/Postman

Step 2

@hcosta
hcosta / login.html
Last active October 27, 2023 18:38
Revisión del template para identificarse en el curso Django 2
{% extends 'core/base.html' %}
{% load static %}
{% block title %}Iniciar sesión{% endblock %}
{% block content %}
<style>.errorlist{color:red;}</style>
<main role="main">
<div class="container">
<div class="row mt-3">
<div class="col-md-9 mx-auto mb-5">
<form action="" method="post">{% csrf_token %}
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active July 7, 2024 12:44
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <sanderthedragon@zoho.com>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
@GabLeRoux
GabLeRoux / env-to-json.py
Last active September 10, 2023 00:45
.env file to json using simple python
#!/usr/bin/env python
import json
import sys
try:
dotenv = sys.argv[1]
except IndexError as e:
dotenv = '.env'
with open(dotenv, 'r') as f:
@njh
njh / auto_select_certificate.json
Created December 22, 2015 11:06
Policy file to configure Chrome/Chromium to automatically select a client certificate (useful for Kiosk mode)
{
"AutoSelectCertificateForUrls": ["{\"pattern\":\"*\",\"filter\":{}}"]
}