Skip to content

Instantly share code, notes, and snippets.

SterlingButters

Block or report user

Report or block SterlingButters

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SterlingButters
SterlingButters / odrive_dir_sync.sh
Created Apr 12, 2019
Syncs oDrive files in the pwd (does not recurse into sub-dirs)
View odrive_dir_sync.sh
#!/bin/bash
for file in ./*; do
if [[ "$file" = *.cloud ]]; then
echo "File[$file] not synced"
/usr/bin/python /home/sterlingbutters/.odrive-agent/bin/odrive.py sync "$file"
elif [[ "$file" = *.cloudf ]]; then
echo "File[$file] not synced"
/usr/bin/python /home/sterlingbutters/.odrive-agent/bin/odrive.py sync "$file"
@SterlingButters
SterlingButters / odrive_deep_sync.sh
Created Apr 12, 2019
Recursively Syncs oDrive Directories and SubDirectories starting from pwd
View odrive_deep_sync.sh
#!/bin/bash
handle_directory(){
for filename in "$1"/*; do
if [[ "$filename" = *.cloud ]]; then
echo "File[$filename] not synced"
/usr/bin/python /home/sterlingbutters/.odrive-agent/bin/odrive.py sync "$filename"
elif [[ "$filename" = *.cloudf ]]; then
echo "File[$filename] not synced"
/usr/bin/python /home/sterlingbutters/.odrive-agent/bin/odrive.py sync "$filename"
View CursorPosition.react.js
import React, { Children, cloneElement } from 'react';
import PropTypes from 'prop-types';
import objectAssign from 'object-assign';
import omit from 'object.omit';
import Core from './lib/ElementRelativeCursorPosition';
import addEventListener from './utils/addEventListener';
import {
INTERACTIONS,
MOUSE_EMULATION_GUARD_TIMER_NAME
} from './constants';
View ElementSelector.react.js
import { Component } from 'react';
export default class ElementsSelector extends Component {
static defaultProps = { items: [], notSelectable: [] };
defaultState = {
selectedItems: [],
selectedRange: [],
firstSelectedItem: null,
isSelecting: false,
You can’t perform that action at this time.