Skip to content

Instantly share code, notes, and snippets.

@RajaShanmugamJM
RajaShanmugamJM / app.component.ts
Last active March 28, 2020 15:09
Simple Google Map Integration with Angular.
import { Component } from '@angular/core';
import { MapService } from './services/gmap.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
providers: [
MapService
],
@chris95x8
chris95x8 / build.gradle
Created October 28, 2014 14:00
Extended toolbar with two floating-label edit texts. The layout was made according to this image from the Material Design guidelines: http://i.imgur.com/x8QsuxU.png The layout below looks like this: http://i.imgur.com/8sOTv7h.png
dependencies {
compile 'com.android.support:appcompat-v7:21.+'
compile 'com.wrapp.floatlabelededittext:library:0.0.5'
}
@othiym23
othiym23 / npm-upgrade-bleeding.sh
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@addyosmani
addyosmani / LICENSE.txt
Last active April 8, 2024 20:15 — forked from 140bytes/LICENSE.txt
Offline Text Editor in < 140 bytes (115 bytes). Powered by localStorage & contentEditable
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Copyright (C) 2014 ADDY OSMANI <addyosmani.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
/*
* Copyright 2014 Chris Banes
*
* 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
@nickalbrecht
nickalbrecht / SelectListExtensionMethods.cs
Last active August 21, 2026 22:06
SelectListItem Extension Methods for DropDowns in MVC Core. Added ability to specify the option's Group, and for some bug fixes, more XML docs
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc.Rendering;
///For adding DebuggerDisplay support within VisualStudio for <see cref="SelectListItem"/>
[assembly: DebuggerDisplay("[Text={Text}, Value={Value}, Selected={Selected}, Group={Group?.Name}]", Target = typeof(SelectListItem))]
/// <summary>
/// Generic set of functions for building a <see cref="List&lt;SelectListItem&gt;"/> (<c>T</c> is <see cref="SelectListItem"/>) for use in rendering HTML <c>select</c> elements
/// </summary>
/// <remarks>Used <see cref="List&lt;&gt;"/> because of the implied order being important, and because <see cref="IList&lt;&gt;"/> and <see cref="IReadOnlyList&lt;&gt;"/> don't implement each other, but <see cref="List&lt;&gt;"/> implements both.</remarks>
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support