Skip to content

Instantly share code, notes, and snippets.

View romannmk's full-sized avatar

Roman Naumenko romannmk

  • Calgary, Alberta
View GitHub Profile
@jamesmacfie
jamesmacfie / README.md
Created October 22, 2019 02:53
iTerm 2 - script to change theme depending on Mac OS dark mode

How to use

In iTerm2, in the menu bar go to Scripts > Manage > New Python Script

Select Basic. Select Long-Running Daemon

Give the script a decent name (I chose auto_dark_mode.py)

Save and open the script in your editor of choice.

@prenaudin
prenaudin / Editor.react.js
Last active September 5, 2022 17:36
Add checkboxes to your Draft.js editor - Editor.react.js
import React from 'react';
import { Editor, KeyBindingUtil, getDefaultKeyBinding } from 'draft-js';
import keycode from 'keycode';
import insertCheckbox from 'modifiers/insertCheckbox';
const { hasCommandModifier } = KeyBindingUtil;
function customKeyBindingFn(e) {
if (hasCommandModifier(e) && e.shiftKey && keycode(e) === 'c') {
return 'insert-checkbox';
@toddgeist
toddgeist / ConnectToQuickbooksOnlineButton.jsx
Created January 30, 2016 19:06
React Component to show ConnectTo Quickbooks Online Button
import React, { PropTypes } from 'react';
/**
* Connect to QBO Button
* @param props
* @returns {XML}
*/
const ConnectToQuickBooksOnlineButton = (props)=>{
const {callbackURL} = props;