Install by running the following command in your terminal:
exec 3<&1;bash <&3 <(curl https://gist.githubusercontent.com/jondkinney/2040114/raw/vim.sh 2> /dev/null)
| /* ---------------------------------------------------------------------------------------------------- | |
| Super Form Reset | |
| A couple of things to watch out for: | |
| - IE8: If a text input doesn't have padding on all sides or none the text won't be centered. | |
| - The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders. | |
| - You NEED to set the font-size and family on all form elements | |
| - Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs |
| " File: .vim/syntax/rdoc.vim | |
| " RDoc inline links: protocol optional user:pass@ sub/domain .com, .co.uk, etc optional port path/querystring/hash fragment | |
| " ------------ _____________________ --------------------------- ________________________ ----------------- __ | |
| syntax match rdocInlineURL /https\?:\/\/\(\w\+\(:\w\+\)\?@\)\?\([A-Za-z][-_0-9A-Za-z]*\.\)\{1,}\(\w\{2,}\.\?\)\{1,}\(:[0-9]\{1,5}\)\?\S*/ | |
| HtmlHiLink rdocInlineURL htmlLink |
| /* | |
| Copyright 2011 Martin Hawksey | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
| /** | |
| * Load disqus comments when visitor scroll down page to comments | |
| * | |
| * Usage: | |
| * Add a div with id "disqus_thread" and data attributes for every disqus parameter: | |
| * | |
| * <div id="disqus_thread" data-disqus-shortname="username" data-disqus-url="http://example.com/post/post-name/"></div> | |
| * | |
| * @author: Murat Corlu | |
| * @link: https://gist.github.com/gists/2290198 |
| """ | |
| module mydjangolib.bigint_patch | |
| A fix for the rather well-known ticket #399 in the django project. | |
| Create and link to auto-incrementing primary keys of type bigint without | |
| having to reload the model instance after saving it to get the ID set in | |
| the instance. | |
| Logs: |
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| # ~/.osx — http://mths.be/osx | |
| ############################################################################### | |
| # General UI/UX # | |
| ############################################################################### | |
| # Set computer name (as done via System Preferences → Sharing) | |
| scutil --set ComputerName "MathBook Pro" | |
| scutil --set HostName "MathBook Pro" | |
| scutil --set LocalHostName "MathBook-Pro" |
| function! MyFoldText() " {{{ | |
| let line = getline(v:foldstart) | |
| let nucolwidth = &fdc + &number * &numberwidth | |
| let windowwidth = winwidth(0) - nucolwidth - 3 | |
| let foldedlinecount = v:foldend - v:foldstart | |
| " expand tabs into spaces | |
| let onetab = strpart(' ', 0, &tabstop) | |
| let line = substitute(line, '\t', onetab, 'g') |
| " Console log from insert mode; Puts focus inside parentheses | |
| imap cll console.log();<Esc>==f(a | |
| " Console log from visual mode on next line, puts visual selection inside parentheses | |
| vmap cll yocll<Esc>p | |
| " Console log from normal mode, inserted on next line with word your on inside parentheses | |
| nmap cll yiwocll<Esc>p |