A Pen by Brandan Majeske on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
rm -rf "$HOME/Library/Preferences/WebIde60" | |
rm -rf "$HOME/Library/Caches/WebIde60" | |
rm -rf "$HOME/Library/Application Support/WebIde60" | |
rm -rf "$HOME/Library/Logs/WebIde60" | |
//// or WebStorm | |
rm -rf "$HOME/Library/Preferences/WebStorm7" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* dependencies: connect-livereload, express, gulp, gulp-autoprefixer, gulp-minify-css, gulp-notify, gulp-ruby-sass, tiny-lr | |
* Files structure: | |
* / | |
- /css | |
- main.css | |
- /node_modules | |
- /sass | |
- main.scss | |
gulpfile.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin box-shadow($top, $left, $blur, $color, $inset: false) { | |
@if $inset { | |
-webkit-box-shadow:inset $top $left $blur $color; | |
-moz-box-shadow:inset $top $left $blur $color; | |
box-shadow:inset $top $left $blur $color; | |
} @else { | |
-webkit-box-shadow: $top $left $blur $color; | |
-moz-box-shadow: $top $left $blur $color; | |
box-shadow: $top $left $blur $color; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.directive('datepickerLocaldate', ['$parse', function ($parse) { | |
var directive = { | |
restrict: 'A', | |
require: ['ngModel'], | |
link: link | |
}; | |
return directive; | |
function link(scope, element, attr, ctrls) { | |
var ngModelController = ctrls[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.filter('adjustDatepicker', [ | |
'$filter', function($filter) { | |
var dateFilter = $filter('date'); | |
return function(dateToFix) { | |
var localDate, localTime, localOffset, adjustedDate; | |
if (dateToFix === null) | |
return null; | |
localDate = new Date(dateToFix); | |
localTime = localDate.getTime(); | |
localOffset = localDate.getTimezoneOffset() * 60000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Gaussian rounding (aka Banker's rounding) is a method of statistically | |
* unbiased rounding. It ensures against bias when rounding at x.5 by | |
* rounding x.5 towards the nearest even number. Regular rounding has a | |
* built-in upwards bias. | |
*/ | |
function gaussianRound(x) { | |
var absolute = Math.abs(x); | |
var sign = x == 0 ? 0 : (x < 0 ? -1 : 1); | |
var floored = Math.floor(absolute); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Handles form errors from server. | |
*/ | |
app.factory('formErrors', function () { | |
return { | |
/** | |
* Creates $error.errorKey (String) and sets validity | |
* for every failing model validation received from the server. | |
* E.g. 'form.message.$error.errorKey' can be accessed in the view. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using global::ServiceStack; | |
using global::ServiceStack.Common.Web; | |
using global::ServiceStack.WebHost.Endpoints; | |
public class CorsFeature : IPlugin | |
{ | |
public const string DefaultMethods = "GET, POST, PUT, DELETE, OPTIONS"; | |
public const string DefaultHeaders = "Content-Type"; | |
private static bool isInstalled = false; |
OlderNewer