Skip to content

Instantly share code, notes, and snippets.

@ZackKnopp
ZackKnopp / MyDataGrid.js
Created November 29, 2018 15:37
Copy paste selection range for react-data-grid
// Tested with react-data-grid v5.0.4, earlier versions MAY NOT HAVE cellRangeSelection
// And it won't show any errors if you try this with an earlier version, so use at least v5.0.4
import React, { Component } from 'react';
import { range } from 'lodash';
import ReactDataGrid from 'react-data-grid'; // Tested with v5.0.4, earlier versions MAY NOT HAVE cellRangeSelection
const columns = [
{ key: 'id', name: 'ID', editable: true },
{ key: 'title', name: 'Title', editable: true },
{ key: 'count', name: 'Complete', editable: true },
module StringCalculator
class << self
def add string_numbers = nil
return 0 unless string_numbers
delimeters = get_delimeters string_numbers
num_array = string_numbers.split delimeters
raise 'negative numbers not allowed' if num_array.join().match(/-[0-9]/)
@Tiny-Giant
Tiny-Giant / HideJobs.user.js
Last active April 3, 2020 12:32
Hides references to Stack Overflow Jobs
// ==UserScript==
// @name Hide Jobs
// @namespace http://github.com/Tiny-Giant
// @version 1.0.0.1
// @description Hides references to Stack Overflow Jobs
// @author @TinyGiant
// @include /https?:\/\/(meta\.)?stackoverflow\.com/.*/
// @grant none
// ==/UserScript==
/* jshint -W097 */