Skip to content

Instantly share code, notes, and snippets.

View pr4bh4sh's full-sized avatar
🏠
Working(from Somewhere)

Prabhash pr4bh4sh

🏠
Working(from Somewhere)
  • ~ 51.4934° N, 0.0098° E
View GitHub Profile

This is an adaptation of https://twitter.com/jasonneylon script.

In the terminal window, you can open your current repo (at the current branch) in your default browser.

My adaptation was adding options to view the commits, branches, pull requests or issues for the repo using one of the additional options (added support for wiki, settings, pulse, graphs, network):

[h]               => View help
[c]               => View commits
[c {SHA}]         => View specific commit from commit SHA

[b] => View branches

@pr4bh4sh
pr4bh4sh / bounds.rb
Created July 6, 2018 16:26 — forked from sleekweasel/bounds.rb
More advanced Android Calabash system notifications handling, per https://techblog.badoo.com/blog/2015/06/01/testing-android-notifications-with-calabash/
# Indices for int[4] rectangles.
X0 ||= 0
Y0 ||= 1
X1 ||= 2
Y1 ||= 3
# Calculate clipped and obscured areas based on lists of orthogonal rectangles.
class Bounds
def initialize(r)
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Returns the result of the shell command
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@pr4bh4sh
pr4bh4sh / README.md
Created February 6, 2018 17:51 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@pr4bh4sh
pr4bh4sh / android_emu_start.sh
Created January 13, 2018 14:50 — forked from stackedsax/android_emu_start.sh
Script for starting up multiple android emulators per box
#!/bin/bash
#####
#
# This script creates android emulators on the fly.
#
# Please refer to the README for usage instructions.
#
####
{"log": {"comment": "", "creator": {"comment": "", "version": "2.1.0-beta-4-littleproxy", "name": "BrowserMob Proxy"}, "version": "1.2", "entries": [{"comment": "", "serverIPAddress": "216.58.197.36", "pageref": "google", "startedDateTime": "2016-03-28T18:27:38.956+05:30", "cache": {}, "request": {"comment": "", "cookies": [], "url": "http://www.google.com/", "queryString": [], "headers": [], "headersSize": 315, "bodySize": 0, "method": "GET", "httpVersion": "HTTP/1.1"}, "timings": {"comment": "", "receive": 0, "send": 0, "ssl": -1, "connect": 7, "dns": 59, "blocked": 0, "wait": 145}, "time": 214, "response": {"status": 302, "comment": "", "cookies": [], "statusText": "Moved Temporarily", "content": {"mimeType": "text/html; charset=UTF-8", "comment": "", "size": 0}, "headers": [], "headersSize": 393, "redirectURL": "http://www.google.co.in/?gfe_rd=cr&ei=Qyr5VqOkCsSL8Qen3YGwCA", "bodySize": 261, "httpVersion": "HTTP/1.0"}}, {"comment": "", "serverIPAddress": "216.58.197.67", "pageref": "google", "startedDateTi
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.remote.MobileBrowserType;
import io.appium.java_client.remote.MobileCapabilityType;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;