Add the styles to the .atom/styles.less
stylesheet in Atom.
This file contains 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
// JS array equivalents to C# LINQ methods - by Dan B. | |
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version): | |
// Here's a simple array of "person" objects | |
var people = [ | |
{ name: "John", age: 20 }, | |
{ name: "Mary", age: 35 }, | |
{ name: "Arthur", age: 78 }, | |
{ name: "Mike", age: 27 }, |
This file contains 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
/** | |
* IE 10 + supports ClassList, but the standards are vague. It is extremely | |
* convenient to add several classnames at once, FF and Chrome support that. | |
* | |
* @author Alexander Milevski <info@w8r.name> | |
* | |
* https://gist.github.com/w8r/fbdbfea078629ff913d4 | |
* | |
* MIT License | |
* |
This file contains 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
// ==UserScript== | |
// @name Github - package.json/bower.json dependency linker | |
// @version 0.0.2 | |
// @namespace http://spiralx.org/github-npm-autolink | |
// @author James Skinner <spiralx@gmail.com> http://userscripts.org/users/55684 | |
// @description When viewing a package.json file, automatically links dependencies to their NPM page | |
// @include https://github.com/*/package.json | |
// @include https://github.com/*/bower.json | |
// @run-at document-end | |
// @grant unsafeWindow GM_xmlhttpRequest |
You can use this class to realize a simple sectioned RecyclerView.Adapter
without changing your code.
The RecyclerView
should use a LinearLayoutManager
.
You can use this code also with the TwoWayView
with the ListLayoutManager
(https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter
provided by Google
Example:
This file contains 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/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
This file contains 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 System.Json; | |
... | |
var response = "{ \"foo\": \"bar\" }"; | |
var jsonValue = JsonValue.Parse (response) as JsonObject; | |
// Split the lambda declaration and initialization | |
// so that we can do recursion; | |
Func<JsonValue, NSDictionary> toNSDictionary; | |
toNSDictionary = (obj)=> { |
This file contains 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
.col-ms-1, | |
.col-ms-2, | |
.col-ms-3, | |
.col-ms-4, | |
.col-ms-5, | |
.col-ms-6, | |
.col-ms-7, | |
.col-ms-8, | |
.col-ms-9, | |
.col-ms-10, |
This file contains 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
git stash show -p stash@{0} > Stash0.patch |
This file contains 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
myFunction( param ) { | |
var emulated = window.tinyHippos != undefined; | |
if ( emulated ){ | |
//do something specific to emulated environment; | |
return; | |
} | |
///do something else... |