RubyMine's clipboard can hold more than one string
By pressing Ctrl
+ Shift
+ V
you can select a recently copied string for pasting.
Related cards:
Ruby's percent notation can do more than strings
Percent Notation
We already know that that we can create strings using the percent notation:
%(<foo="bar's ton">)
is perfectly fine Ruby.
Modifier
Bu...
Excel files can't hold more than 65535 rows per worksheet
"Classic" Excel (XLS) has a magic limit of 65535 rows per worksheet. This was fixed in XLSX but the version used by the Spreadsheet gem can only write XLS files.
If you want to write more data, consider hackin...
Prevent RubyMine from reformatting pasted code
When you paste copied code with CTRL+V
, RubyMine will change the indentation of the pasted code. You can prevent this by pasting with CTRL+ALT+Shift+V
instead ("Paste Simple").
To change this behavior entirely, you can open your settings and ...
The developer console can do more than you think!
You can do so much more than console.log(...)
! See the attached link for a great breakdown of what the developer console can give you.
Some of my favorites:
console.log takes many ...
Copy & Paste & The Web | CSS-Tricks
Insanely detailled guide about controlling copy & paste behavior using web technology in 2015.
Note that you can now trigger a copy action through Javascript, no Flash required.
Flash-Free Clipboard for the Web
Unfortunately, Web APIs haven’t provided the functionality to copy text to the clipboard through JavaScript, which is why visiting GitHub with Flash disabled shows an ugly grey box where the button is supposed to be. Fortunately, we have a solut...
Copy to clipboard without flash (clipboard.js)
We used zeroclipboard.js
in some of our projects but now we switched to clipboard.js
because it does not rely on flash. Flash support of the major browsers has ended.
Some more advantages of clipboard.js:
...
Using ActiveRecord with threads might use more database connections than you think
Database connections are not thread-safe. That's why ActiveRecord uses a separate database connection for each thread.
For instance, the following code uses 3 database connections:
3.times do
Thread.new do
User.first # first databa...
How can you detect if two regular expressions overlap in the strings they can match? - Stack Overflow
I have a container of regular expressions. I'd like to analyze them to determine if it's possible to generate a string that matches more than 1 of them. Short of writing my own regex engine with this use case in mind, is there an easy way in C++ o...
Export more than 500 rows in Google Analytics
Currently, only up to 500 rows of Analytics table data can be exported at a time into CSV format. If you need to export larger data sets, like exporting all keywords that sent traffic to your site, you can export multiple times as long as each bat...