Action | Keyboard Shortcut |
---|---|
Close | Ctrl + F4 |
Close Others | Alt + Shift + F4 |
Close All | Ctrl + Alt + Shift + F4 |
Close Unmodified | Alt + F4 |
Reopen | Ctrl + Shift + T |
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
klas = item_type.constantize | |
has_many_associations = klas.reflections.collect { |_, c| c.class_name if c.macro == :has_many }.compact | |
has_one_associations = klas.reflections.collect { |_, c| c.class_name if c.macro == :has_one }.compact | |
instance = klas.find item_id | |
@result = instance.some_method | |
has_one_associations.each do |assoc_string| | |
assoc_string = assoc_string.underscore |
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
const fs = require('fs'); | |
const requirePatterns = [ | |
/(import.*from\W*)(?:(')(.*)(?!\/)'|(")(.*)(?!\/)")(.*)/g, | |
/(require\W*\()(?:(')(.*)(?!\/)'|(")(.*)(?!\/)")(.*)/g | |
]; | |
const extension = '.ts'; | |
function decodeOption(key, value) { | |
switch (key) { |
- StyleLint BEM
- CSS BEM
- CSS Modules (babel-react-css-modules-plugin)
- z-index stacking mixin
- Mixins over Global definition of styles?
- Scut
- Parent positions children
- Bring semantics into css but keep them in html
- Styletron :/
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
function isMultipleOf(x, say) { | |
return (i) => i % x == 0 ? say() : ''; | |
} | |
const thenSay = (say) => () => say; | |
// The order matters. Any function with the signature (any)->(int)->str is valid | |
const whatShouldISayWhen = [ | |
isMultipleOf(3, thenSay('Fizz')), | |
isMultipleOf(5, thenSay('Buzz')) | |
]; |
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
function detectSeparator(input) { | |
const availableSeparators = [ ';', ',', '|' ]; | |
const separatorCount = availableSeparators.map((separator) => occurrences(input, separator)); | |
return R.transpose([ availableSeparators, separatorCount ]) | |
.reduce((maxSeparator, separator) => { | |
return separator[1] > maxSeparator[1] ? separator : maxSeparator; | |
}, [ availableSeparators[0], -1 ])[0]; | |
} |
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
objects = [] | |
order = %w(first second) | |
objects | |
.group_by(&:order_by_this) # Create grouping according to field | |
.each { |_, h| h.sort_by!(&:sort_each_by_this).reverse! } # Each hash sorted individually | |
.values_at(*order) # Sorting according to order | |
.compact # Reject empty hash keys (no elements for order item) | |
.flatten(1) # Remove hash table | |
.concat(objects.reject { |o| order.include? o.order_by_this }) # Append all unidentified at the end |
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/perl | |
# Scan unstaged changes in git tracked files, identify which commits they could | |
# be applied to as fixups, and automatically produce the appropriate "fixup!" | |
# commits for use with "git rebase -i --autosquash". | |
# | |
# Copyright (C) 2016, 2017 by Mat Sutcliffe | |
# This program is free software; you can redistribute it and/or modify it under | |
# the GNU General Public License as published by the Free Software Foundation; | |
# either version 2 of the License, or (at your option) any later version. |
- The Art of War
- How to talk TED
- Debt: years
- Start with Why?
- Leaders eat last
- Aufm Weg zur finanzieller Freiheit
- Adversaries into allies (Bob Burg)
- Which one citizen described as "Disturbingly Enticing"
- That's my husband. ... Who's he carying?
- Either you hire her back or I quit! ... You don't work for me
- You couldn't remember your phone number. But you gave me your phone
- You're trying to lure this young lady into your van? ... Yeah?! But she's being really difficult about it
- Greg, your service is crap.
- You forgot to paint a painting son
- You can wait at that table and someone will be here sometime. ... But aren't you here now? ... No
OlderNewer