Skip to content

Instantly share code, notes, and snippets.

View delterr's full-sized avatar

Hasan delterr

View GitHub Profile
@tauzen
tauzen / urls.py
Created February 1, 2014 13:49
Example of using login_required and staff_member_required decorators with Class-based views in Django.
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib import admin
from application.views import ApplicationFormView, ApplicationListView
admin.autodiscover()
urlpatterns = patterns('',
@fourohfour
fourohfour / smh-api.md
Created November 6, 2016 13:25
Information about the Show My Homework API

Show My Homework API


File detailing what I've worked out so far from investigating the Show My Homework API.

API Requests

API requests are made in the form of a HTTPS GET request to the SMH API endpoint.

https://api.showmyhomework.co.uk/api/{request}

@krisbolton
krisbolton / fix-USB-showing-up-as-two-partitions.md
Last active November 15, 2024 06:07
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows

How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:

  1. Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
  2. In the Powershell interface type diskpart to enter the disk partition tool.
  3. Type list disk to see all disks listed.
  4. Select the USB drive by typing select disk [NUMBER]. Be careful to select the correct drive.
  5. Type clean. An error will occur if you have the drive folder open, close the window and repeat the command if this happens.
  6. Type create partition primary.
  7. Type format fs=ntfs quick to format the drive (you can also choose to set fs=fat32).
  8. Type active.