Skip to content

Instantly share code, notes, and snippets.

View evanportwood's full-sized avatar

Evan Portwood evanportwood

View GitHub Profile

#split string into an array of strings

source: http://stackoverflow.com/a/3008775/105282

namespace StringChunks
{
    static class Tools
    {
        public static IEnumerable<string> SplitByLength(this string str, int maxLength)
@evanportwood
evanportwood / viewport-units-ios.less
Created October 20, 2016 19:28 — forked from ziadkh0/viewport-units-ios.less
LESS mixin to support vh and vw units on all iOS Safari versions. Based on an idea by Patrick Burtchaell's: https://gist.github.com/pburtchaell/e702f441ba9b3f76f587 and the SCSS version by Benjamin Morel's: https://gist.github.com/BenMorel/e9e34c08360ebbbd0634
/**
* Fix for vw, vh, vmin, vmax on iOS 7.
* http://caniuse.com/#feat=viewport-units
*
* This fix works by replacing viewport units with px values on known screen sizes.
*
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix.
* Target devices running iOS 8+ will incidentally execute the media query,
* but this will still produce the expected result; so this is not a problem.
*
@evanportwood
evanportwood / README.md
Created March 22, 2016 21:08 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@evanportwood
evanportwood / config.json
Created March 22, 2016 19:13 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#3d8e33",
"@brand-success": "#5cb85c",
.hide {
display: none;
}
#lnkNew {
font-size: .85em;
font-weight: normal;
margin-left: 1em;
}
@evanportwood
evanportwood / gist:3656091
Created September 6, 2012 13:09 — forked from jheath/gist:3642286
RegEx replace with lowercased value

if you have a string like "6FA34323-C71F-4FD4-996F-002CE77E6B77"

search w/ regexp using ("[A-Z0-9-]+") replace with \L$1

\U will uppercase


Vim version: