Skip to content

Instantly share code, notes, and snippets.

View maxxst's full-sized avatar

Maximilian Stauss maxxst

View GitHub Profile
@maxxst
maxxst / custom.js
Created August 2, 2012 10:24 — forked from drewjoh/custom.js
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.0)
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
if (href.indexOf('#') == 0) {
$(href).modal('open');
} else {
@maxxst
maxxst / gist:4270987
Created December 12, 2012 19:52
Sublime Text 2 UserPreferences
{
"font_face": "Source Code Pro",
"font_size": 12.0,
"tab_size": 2,
"translate_tabs_to_spaces": true,
"indent_to_bracket": true
}
@maxxst
maxxst / cleanOpenWith.sh
Last active December 14, 2015 12:58
OSX Terminal command to clean up "Open With"
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
@maxxst
maxxst / pip_update_all.sh
Created March 5, 2013 11:42
OSX Terminal command to update all PIP installed Python addons
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U
@maxxst
maxxst / private.xml
Last active December 14, 2015 12:58 — forked from behrends/private.xml
My setup for 'KeyRemap4MacBook' to get some German Keyboard habits to US-Layout to usel: 'Open KeyRemap4MacBook Preferences...' > Go to 'Misc & Uninstall' > Click 'Open private.xml' > add all Files
<?xml version="1.0"?>
<root>
<include path="set_option_l_to_at.xml" />
<include path="set_option_e_to_euro.xml" />
<include path="umlaut_access.xml" />
</root>
#employees/models.py
from django.db import models
from django.contrib.auth.models import (
BaseUserManager, AbstractBaseUser, PermissionsMixin
)
class MinimalUserManager(BaseUserManager):
def create_user(self, email, password):
@maxxst
maxxst / Default (OSX).sublime-keymap
Last active July 27, 2019 10:12
A keybinding for Sublime Text 3 that makes SHIFT + SPACE move the cursor one character to the right
[
{ "keys": ["shift+space"], "command": "move", "args": {"by": "characters", "forward": true} }
]
@maxxst
maxxst / _breakpoints.sass
Created September 23, 2013 16:30
My breakpoints I want to use for responsive design using bourbon and neat
// all portrait
$iphone-portrait: em(320)
$samsung-galaxy-portrait: em(380)
$kindle-portrait: em(600)
$ipad-portrait: em(768)
// all landscape
$iphone-landscape: em(480)
{
"ignored_packages":
[
"Vintage"
],
"tab_size": 2,
"translate_tabs_to_spaces": true
}
@maxxst
maxxst / WhatTheCommit.applescript
Created November 12, 2013 11:39
Install the "whatthecommit"-command line tool https://github.com/lwe/whatthecommit and you can use that typinator stuff
set whatwhat to do shell script "/usr/local/bin/whatthecommit -n"
return whatwhat