Skip to content

Instantly share code, notes, and snippets.

View jarodsmk's full-sized avatar
🎸
Feeling djent-y

jarodsmk

🎸
Feeling djent-y
View GitHub Profile
@jarodsmk
jarodsmk / orient.py
Created September 23, 2019 11:51
Correct text-image orientation with Python/Tesseract/OpenCV
import cv2
import pytesseract
import urllib
import numpy as np
import re
# Installs: https://www.learnopencv.com/deep-learning-based-text-recognition-ocr-using-tesseract-and-opencv/
if __name__ == '__main__':
@jarodsmk
jarodsmk / prettier.bat
Last active February 7, 2019 06:47
CMD - Running Prettier recursively for every file with our config
prettier --list-different --write --config ../.prettierrc "{,!(node_modules)/**/}*.js"
import React, { Component } from 'react';
import { SF_OAUTH_URL, REMOTE_ACCESS_CONSUMER_KEY } from 'react-native-dotenv';
import { AsyncStorage, Button, View, Text } from 'react-native';
import { AuthSession } from 'expo';
import { globalStyles } from '../constants/Styles';
import ScreenKeys from '../constants/ScreenKeys';
export default class SignInScreen extends Component {
static navigationOptions = {
title: 'Please sign in',
@jarodsmk
jarodsmk / post-commit
Created June 1, 2018 07:42
Post commit hook to update the files in your git index
#!/bin/sh
git update-index -g
@jarodsmk
jarodsmk / pre-commit
Created June 1, 2018 07:39
Precommit hook for merge markers and console.log
#!/bin/sh
# ------------------------------------------------------------------------------------#
# Console log check
# ------------------------------------------------------------------------------------#
# Redirect output to stderr.
exec 1>&2
# Enable user input
# exec < /dev/tty
# Updated regexp to only look at the addition of console.log's on the current branch HEAD
@jarodsmk
jarodsmk / MultiTranslateHttpLoader.ts
Last active March 5, 2018 08:31 — forked from BorisWechselberger/MultiTranslateHttpLoader.ts
TranslateLoader for multiple JSON files
import {HttpClient} from '@angular/common/http';
import {TranslateLoader} from '@ngx-translate/core';
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/observable/forkJoin';
export function translateLoader(http: HttpClient) {
return new MultiTranslateHttpLoader(http, [
{prefix: './assets/i18n/', suffix: '.json'},
{prefix: './assets/i18n/countries-', suffix: '.json'}
@jarodsmk
jarodsmk / pre-commit
Last active September 30, 2021 03:44 — forked from guilherme/gist:9604324
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit, detects merge markers, and prettifies your code!
#!/bin/sh
# ------------------------------------------------------------------------------------#
# Console log check
# ------------------------------------------------------------------------------------#
# Redirect output to stderr.
exec 1>&2
# Enable user input
exec < /dev/tty
# Updated regexp to only look at the addition of console.log's on the current branch HEAD