Skip to content

Instantly share code, notes, and snippets.

@examinedliving
examinedliving / example.js
Created January 5, 2018 18:42 — forked from colingourlay/example.js
Lodash / Underscore sort object keys. Like _.sortBy(), but on keys instead of values, returning an object, not an array. Defaults to alphanumeric sort.
var obj = {b: 3, c: 2, a: 1};
_.sortKeysBy(obj);
// {a: 1, b: 3, c: 2}
_.sortKeysBy(obj, function (value, key) {
return value;
});
// {a: 1, c: 2, b: 3}
@bantya
bantya / CCFilesFromFileExplorerRemove.reg
Last active June 21, 2021 05:05
REG: Registry hacks for Windows 10
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{0E270DAA-1BE6-48F2-AC49-4E2781B29975}]
@="Creative Cloud Files"
"System.IsPinnedToNameSpaceTree"=dword:00000000
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0E270DAA-1BE6-48F2-AC49-4E2781B29975}]
@="Creative Cloud Files"
"System.IsPinnedToNameSpaceTree"=dword:00000000
@anschaef
anschaef / bootstrap-4-sass-mixins-cheat-sheet.scss
Last active April 12, 2024 08:49
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.5.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins
/* -------------------------------------------------------------------------- */
/*
// ########################################################################## */
// New cheat sheet for Bootstrap 5:
@examinedliving
examinedliving / make-ratio.less
Last active December 4, 2017 19:39
Less.css mixin that creates a responsive box to hold image of a particular aspect ratio
////**
// * @file-name: make-ratio.less
// * @description A mixin that creates a box that will size responsively to the aspect ratio of an image at all sizes
// * @main make-ratio
// * @internal make-ratio-parent, make-ratio-child
// * @param {number} @width The Width as a number - This is the width of the aspect ratio, not that of the element, nor a percent
// * @param {number} @height The Height as a number - see @width for description required
// * @param {string} @child - this is the element that will be directly within the outer element of the ratio - defaults to a - only required for using @main mixin (.make-ratio)
// * @example
@examinedliving
examinedliving / Trello-label-color-mixin.less
Last active May 11, 2017 17:18
Mixin to generate CSS to change the label colors in Trello. Meant to be used with Stylish or another runtime css modifier.
// Trello mixin to use with stylish or something.
// Changes the trello card label colors based upon color variables
// wrapped it all in one mixin just for fun - the outer mixin is only useful for cleanliness and organization
.make-card-labels(){
// list of all label colors in Trello. Variable name must remain as they are for this mixin to work properly.
@red:#CF4647;
@ipbastola
ipbastola / jq to filter by value.md
Last active September 3, 2024 14:40
JQ to filter JSON by value

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

Command: Format.AlignBottoms
Id: 5efc7975-14bc-11cf-9b2b-00aa00573819 1
Binding: VC Dialog Editor::Ctrl+Shift+Down Arrow
Key Binding: VC Dialog Editor VC Dialog Editor::Ctrl+Shift+Down Arrow
Command: Format.AlignMiddles
Id: 5efc7975-14bc-11cf-9b2b-00aa00573819 2
Binding: VC Dialog Editor::F9
Key Binding: VC Dialog Editor VC Dialog Editor::F9
Command: Format.AlignLefts
Id: 5efc7975-14bc-11cf-9b2b-00aa00573819 3
@chrisdiana
chrisdiana / footer.js
Last active January 28, 2021 03:42
Dynamically add footer to jQuery Datatable
@Maximus5
Maximus5 / TrueColour.md
Created February 16, 2016 20:17 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
@J2TEAM
J2TEAM / sublime-text-scopes.md
Last active January 17, 2024 22:44 — forked from iambibhas/scopes.txt
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure