Skip to content

Instantly share code, notes, and snippets.

View puresamari's full-sized avatar
👁️
TERNARY OPERATORS ARE BAE

Simon Rothert puresamari

👁️
TERNARY OPERATORS ARE BAE
View GitHub Profile
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active June 28, 2024 18:01 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@puresamari
puresamari / keybindings.json
Last active June 28, 2016 16:13
My personal Visual Code Configuration
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "cmd+shift+7", "command": "editor.action.commentLine", "when": "editorTextFocus" }
]
@mattlong
mattlong / admin.py
Created September 17, 2014 18:26
Add a custom admin page for a model and link to it from the detail page
from functools import update_wrapper
from django.contrib import admin
from django.contrib.admin import ModelAdmin
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
from django.core.exceptions import PermissionDenied
from django.shortcuts import render
from myapp.models import Widget
from myapp.forms import ManageWidgetForm
@gre
gre / easing.js
Last active June 27, 2024 15:37
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {