Skip to content

Instantly share code, notes, and snippets.

@lontivero
lontivero / gist:593fc51f1208555112e0
Last active June 24, 2023 20:05
Generates Markdown from VS XML documentation file
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
namespace GithubWikiDoc
{
@sanderhahn
sanderhahn / gulpfile.js
Last active September 11, 2019 14:45
Minify and templateCache your Angular Templates using Gulp
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var templates = require('gulp-angular-templatecache');
var minifyHTML = require('gulp-minify-html');
// Minify and templateCache your Angular Templates
// Add a 'templates' module dependency to your app:
// var app = angular.module('appname', [ ... , 'templates']);
@anaisbetts
anaisbetts / GravatarLoader.cs
Created August 14, 2013 16:20
Gravatar loading and caching using Akavache and Splat
using System;
using Akavache;
using Splat;
using System.Security.Cryptography;
using System.Text;
using System.Globalization;
using ReactiveUI;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
@cureos
cureos / MvxCloseableWpfViewPresenter.cs
Last active December 20, 2015 01:59
WPF specific view presenter class supporting closing an MVVMCross based application
public class MvxCloseableWpfViewPresenter : MvxWpfViewPresenter
{
#region FIELDS
private readonly Window _window;
#endregion
#region CONSTRUCTORS
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
@isGabe
isGabe / index.html
Created May 22, 2013 17:31
HTML/CSS/JS: Mobile Menu Toggle with CSS Transitions & JS Fallback #snippet
<a id="mobile-menu-toggle" href="#">Menu</a>
<nav id="main-nav" class="closed">
<ul>
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
<li><a href="#">Four</a></li>
<li><a href="#">Five</a></li>
</ul>
@anaisbetts
anaisbetts / FilesystemWatchCache.cs
Created May 8, 2013 22:14
An Rx-friendly Filesystem Watcher
using System;
using System.IO;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using ReactiveUI;
namespace SaveAllTheTime.Models
{
interface IFilesystemWatchCache
{
@skayred
skayred / asp-net-webapi.cs
Created October 17, 2012 07:56
Nancy and ASP.NET Web API comparison
namespace aspapi.Controllers
{
public class TaskApiController : ApiController
{
private readonly ITaskRepository taskRepository;
public TaskApiController()
{
taskRepository = new TaskRepository();
}
@yorkxin
yorkxin / avoid-jquery-when-possible.md
Created July 7, 2012 13:04
Avoid jQuery When Possible

Avoid jQuery When Possible

jQuery does good jobs when you're dealing with browser compatibility. But we're living in an age that fewer and fewer people use old-school browsers such as IE <= 7. With the growing of DOM APIs in modern browsers (including IE 8), most functions that jQuery provides are built-in natively.

When targeting only modern browsers, it is better to avoid using jQuery's backward-compatible features. Instead, use the native DOM API, which will make your web page run much faster than you might think (native C / C++ implementaion v.s. JavaScript).

If you're making a web page for iOS (e.g. UIWebView), you should use native DOM APIs because mobile Safari is not that old-school web browser; it supports lots of native DOM APIs.

If you're making a Chrome Extension, you should always use native APIs, not only because Chrome has almost the latest DOM APIs available, but this can also avoid performance issue and unnecessary memory occupation (each jQuery-driven extension needs a separate

@rizal-almashoor
rizal-almashoor / License.txt
Created May 28, 2012 08:53
Exception-handling wrappers for Task.ContinueWith()
Copyright (c) 2012 Rizal Almashoor
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE