Skip to content

Instantly share code, notes, and snippets.

Josh Strange joshstrange

Block or report user

Report or block joshstrange

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
View phoenix.ts
import log from './logger';
import {find} from 'lodash';
function move(window: Window, screen: Screen | null) {
if(window.isVisible() && screen !== null) {
window.setTopLeft({x: screen.flippedVisibleFrame().x, y: screen.flippedVisibleFrame().y});
function moveAndFull(window: Window, screen: Screen | null) {
joshstrange / patch-ionic-angular.js
Created Jul 5, 2019
Patch ionic angular to fix swipe back issue
View patch-ionic-angular.js
/* tslint:disable */
var fs = require('fs');
let filePath = './node_modules/@ionic/angular/dist/fesm5.js';
let monkeyPatch = `// Start monkey patching
StackController.prototype.startBackTransition = function () {
return __awaiter(this, void 0, void 0, function () {
var leavingView, views, enteringView_1;
var _this = this;
return __generator(this, function (_a) {
joshstrange / unraid-usb-backup.js
Created Jun 25, 2019
Backup your Unraid USB remotely. Just replace the hostname, username, password at the top of the file with your info, make sure `request` and `request-promise-native` are installed and then just run it with `node index.js`
View unraid-usb-backup.js
const request = require('request-promise-native');
const fs = require('fs');
let hostname = '';
let username = 'root';
let password = 'mypassword';
(async () => {
// Get CSRF Token
joshstrange / fetchGraphQLSchema
Created Jun 26, 2018
Fetch graphql schema and save to file
View fetchGraphQLSchema
#!/usr/bin/env node
const os = require('os');
const request = require('request-promise-native');
const fs = require('mz/fs');
let hostname = os.hostname();
let baseUrl = 'YOUR_BASE_URL';
(async () => {
let jwt = await getJwt();
joshstrange /
Created Apr 28, 2018
Control script for Xiaomi Dafang
package ZoneMinder::Control::Xiaomi;
use 5.006;
use strict;
use warnings;
require ZoneMinder::Base;
require ZoneMinder::Control;
our @ISA = qw(ZoneMinder::Control);
joshstrange / gitlab-ci.yaml
Created Oct 14, 2017
Gitlab CI Config for Fastlane
View gitlab-ci.yaml
- beta
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
dependencies: []
stage: beta
joshstrange / Fastfile
Last active Jun 30, 2019
Fastfile for iOS/Android
View Fastfile
# Customise this file, documentation can be found here:
# All available actions:
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
joshstrange / add_target_attributes_and_push_notification_cap.js
Created Oct 14, 2017
Add target attributes and push notification cap Cordova Hook
View add_target_attributes_and_push_notification_cap.js
module.exports = function(context) {
var fs = require('fs');
var ROOT_DIR = context.opts.projectRoot;
if(ROOT_DIR.substr(0, 1) === '/' && fs.existsSync(ROOT_DIR + "/platforms/ios")) {
var srcFile = ROOT_DIR + "/platforms/ios/My App.xcodeproj/project.pbxproj";
var projectPbxproj = fs.readFileSync(srcFile, "utf8");
joshstrange / closest.go
Created Oct 1, 2016
Docker-gen Closest
View closest.go
package main
import (
func arrayClosest(values []string, input string) string {
best := ""
View gist:f28e324cdfdc39b116a6
Verifying I am +joshstrange on my passcard.
You can’t perform that action at this time.