Skip to content

Instantly share code, notes, and snippets.

View RoyalSix's full-sized avatar

Sterling (Jay) Scott RoyalSix

  • Los Angeles, CA
View GitHub Profile
const api = window.ModuleApi;
const React = api.React;
const CoreStore = require('../../../stores/CoreStore.js');
const CoreActions = require('../../../actions/CoreActions.js');
const SideNavBar = require('./SideNavBar');
const Chevron = require('./Chevron');
const style = require("./Style");
const MenuHeaders = require('../navigation_menu/MenuHeaders');
//app.js
this.state.projectModalProps = {
showCreateProject: (input) => {
var modal = CoreStore.getShowProjectModal();
if (input) {
modal = input;
CoreStore.projectModalVisibility = input;
}
if (modal === 'Languages') {
@RoyalSix
RoyalSix / OnlineMode.js
Created July 7, 2017 04:25
Online Mode Archive
//OnlineStatus.js
import React from 'react';
import {Glyphicon} from 'react-bootstrap';
// constant declaration
const style = {
textOffline: {
color: "var(--warning-color)",
display: "inline",
backgroundColor: 'var(--background-color-dark)',
outline: 'none',
@RoyalSix
RoyalSix / git-md
Last active August 9, 2017 03:26
Shortcut to merge current branch into develop
#!/bin/bash
# Usage: git md
# Goes in your bin folder, mine is /usr/bin/
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
git checkout origin/develop
git pull origin develop
npm run pull-apps
git checkout $BRANCH_NAME
git merge origin/develop
{
"1": "Paul, an apostle of Christ Jesus through the will of God, to God's holy people in Ephesus, who are faithful in Christ Jesus.\\f + \\ft Some early versions omit, \\fqa in Ephesus, \\fqa* but this expression is probably in Paul's original letter.\\f*",
"2": "Grace to you and peace from God our Father and the Lord Jesus Christ.",
"3": "May the God and Father of our Lord Jesus Christ be praised, who has blessed us with every spiritual blessing in the heavenly places in Christ.",
"4": "God chose us in him from the beginning of the world, that we may be holy and blameless in his sight in love \\f + \\ft Some interpreters place the phrase \\fqa in love \\fqa* with the next sentence, EPH 1:5 \\fqa In love God chose us ... \\f*.",
"5": "\\f + \\ft Some interpreters place the last phrase of EPH 1:4 \\fqa in love \\fqa* with verse 5 so that it reads, \\fqa In love God chose us ... \\f* God chose us beforehand for adoption as sons through Jesus Christ, according to the good pleasure of his will.",
"6"
@RoyalSix
RoyalSix / git-commands.txt
Last active May 29, 2018 06:00
Handy Git Commands
*** NOTE: DO NOT USE UNLESS YOU WANT TO NUKE YOUR TOOLS AND GET THE LATEST FROM MASTER BRANCH ***
git submodule deinit -f . && git submodule update --init
*** Reset a folder/file hard
git checkout origin/branch -- folder_path/*
*** Remove all local branches except develop ***
git branch | grep -v "develop" | xargs git branch -D
@RoyalSix
RoyalSix / git
Created October 18, 2017 07:50
Git install syntax
https://username:[email protected]/username/reponame.git
@RoyalSix
RoyalSix / tCworkflow.txt
Last active November 1, 2017 18:40
tC Development Workflow
1. Choose a story, make it an epic
2. Assign tasks to epic, and put est. hours in title (Along with task label)
3. Put tasks from above in 'Sprint Task Backlog' pipeline
4. Put working tasks and epic in 'in progress' pipeline (Update hours regularly, close tasks when done)
5. When done with all tasks make a PR, and connect PR to epic above.
6. Using the assignees option, assign devs to review
7. After PR is reviewed and merged, drag story to pending build
@RoyalSix
RoyalSix / VerseCheck.js
Created May 2, 2018 19:38
VerseCheck Old Logic
import React, {Component} from 'react';
// import {optimizeSelections, normalizeString} from './utils/selectionHelpers';
// import isEqual from 'deep-equal';
// import usfmjs from 'usfm-js';
import {VerseCheck} from 'tc-ui-toolkit';
class App extends Component {
// constructor(props) {
// super(props);
@RoyalSix
RoyalSix / GroupMenu.js
Created May 3, 2018 18:42
Group Menu Logic
export function getWordAlignmentProgressForGroupIndex(projectSaveLocation, bookId, groupIndex) {
let checked = 0;
const pathToWordAlignmentData = path.join(projectSaveLocation, '.apps', 'translationCore', 'alignmentData', bookId);
let groupDataFileName = fs.readdirSync(pathToWordAlignmentData).find(file => { // filter out .DS_Store
//This will break if we change the wordAlignment tool naming
//convention of chapter a like chapter_1.json...
return path.parse(file).name === groupIndex.id.split('_')[1];
});
if (groupDataFileName) {