Skip to content

Instantly share code, notes, and snippets.

View kapoorlakshya's full-sized avatar
🙃

Lakshya Kapoor kapoorlakshya

🙃
View GitHub Profile
# 1 - 'Intranet'
# 2 - 'Trusted Sites'
# 3 - 'Internet'
# 4 - 'Restricted Sites
zones = [1, 2, 3, 4]
# @see https://superuser.com/questions/1031225/what-is-the-registry-setting-to-enable-protected-mode-in-a-specific-zone
mode = 0 # Enable
# mode = 3 # Disable

Questions to ask potential employers

  • How long do you expect it would take me to deploy my first change? To become productive? To understand the codebase?
  • What kind of equipment will I be provided? Will the company pay/reimburse me if I want something specific?
  • What's the longest tenure of a developer at this company?
  • How long has the top quarter of the developers been here?
  • What fraction of the developers have been here less than 6 months?
  • How long does it take to do a complete deployment?
  • How large are PRs? For a "big" PR, how many lines of code? How long is it open?
  • About what fraction of their time are developers given (implicitly or explicitly) the freedom to explore?
@kapoorlakshya
kapoorlakshya / fork_updater.rb
Created June 8, 2018 08:50 — forked from Skarlso/fork_updater.rb
Ruby script to update all your forked repositories
#!/usr/bin/env ruby
require 'octokit'
require 'logger'
@logger = Logger.new("output.log")
def update_fork(repo)
repo_name = repo.name
# clone the repository -- octokit doesn't provide this feature as it's a github api library
@kapoorlakshya
kapoorlakshya / Enable Casting in SRWare Iron
Last active October 14, 2020 13:00
Enable Casting in SRWare Iron
If your SRWare Iron fails to detect your Chromecast, modify the following flags in `chrome://flags`:
1. Cast Streaming hardware video encoding - Disabled
2. Load Media Router Component Extension - Enabled
3. Media Remoting during Cast Tab Mirroring - Enabled
Restart the browser and you should now be able to cast to your Chromecast!
Source: Figured out this working combination after reading through countless forum posts, Chromecast help pages, and playing with the flags.
switches = %w(--ignore-certificate-errors)
opts = { timeout: 120,
url: 'http://localhost:4444/wd/hub',
switches: switches,
tz: 'America/Los_Angeles' }
Watir::Browser.new(:chrome, opts)
// Build Cucumber Report
post {
always {
dir(path: 'cucumber-watir') {
cucumber(classifications: [
[
key: 'App Node',
value: '${app_node}'
],
[
@kapoorlakshya
kapoorlakshya / RubyMine ConEmu + Git Bash in Terminal
Last active February 12, 2019 00:10
RubyMine ConEmu + Git Bash in Terminal
ConEmu in RubyMine
------------------
1. Create file rubymine-conemu.bat
2. Paste: cmd.exe /k "C:\Program Files\ConEmu\ConEmu\CmdInit.cmd"
3. In RubyMine > Terminal Settings > Shell Path: "C:\Program Files\ConEmu\rm-conemu.bat"
Git Bash from cmd
-----------------
@kapoorlakshya
kapoorlakshya / rubocop.yml
Created April 11, 2019 05:56
rubocop.yml
# Please keep AllCops, Bundler, Layout, Style, Metrics groups and then order cops
# alphabetically
#
# References:
# * https://github.com/bbatsov/ruby-style-guide
# * https://rubocop.readthedocs.io/
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
ExtraDetails: false
@kapoorlakshya
kapoorlakshya / Checkout BitBucket PR
Last active May 1, 2019 22:51
Checkout BitBucket PR
git remote add my_remote <git_clone_URL_of_repo>
git remote -v # Verify repo was added
git config --add remote.my_remote.fetch +refs/pull-requests/*/from:refs/remotes/my_remote/pr/* # Configure to fetch PR
git fetch qa -p # Fetch PRs and remove links to merged PRs
git branch -a # List all branches and PRs
git checkout -t my_remote/pr/45
@kapoorlakshya
kapoorlakshya / selenium_click_bang_fails.log
Created May 15, 2019 00:34
selenium_click_bang_fails.log
# Logfile created on 2019-05-14 17:29:58 -0700 by logger.rb/66358
2019-05-14 17:29:58 INFO Selenium -> POST session/b91ca0b702dfa9a69b04de79ad2c1422/element
2019-05-14 17:29:58 INFO Selenium >>> http://127.0.0.1:9515/session/b91ca0b702dfa9a69b04de79ad2c1422/element | {"using":"xpath","value":".//*[local-name()='iframe'][contains(@src, 'SearchPage_Procedure')]"}
2019-05-14 17:29:59 INFO Selenium <- {"value":{"element-6066-11e4-a52e-4f735466cecf":"c63f8530-e6cd-4e7d-bfef-27e378c33a30"}}
2019-05-14 17:29:59 INFO Selenium -> POST session/b91ca0b702dfa9a69b04de79ad2c1422/frame
2019-05-14 17:29:59 INFO Selenium >>> http://127.0.0.1:9515/session/b91ca0b702dfa9a69b04de79ad2c1422/frame | {"id":{"element-6066-11e4-a52e-4f735466cecf":"c63f8530-e6cd-4e7d-bfef-27e378c33a30"}}
2019-05-14 17:29:59 INFO Selenium <- {"value":null}
2019-05-14 17:29:59 INFO Selenium -> POST session/b91ca0b702dfa9a69b04de79ad2c1422/element
2019-05-14 17:29:59 INFO Selenium >>> http://127.0.0.1:9515/session/b91ca0b702dfa9a69b04de79ad2c14