Skip to content

Instantly share code, notes, and snippets.

View imRohan's full-sized avatar
🎧
Focusing

Rohan Likhite imRohan

🎧
Focusing
View GitHub Profile
@imRohan
imRohan / pokemon.json
Created August 19, 2021 15:10
Pokemon Data
[
{
"id": "001",
"name": "Bulbasaur",
"classification": "Seed Pokémon",
"types": [
"Grass",
"Poison"
],
"resistant": [
@imRohan
imRohan / cocktails.csv
Last active April 4, 2023 20:16
Cocktails w/ Ingredients CSV
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 6 columns, instead of 5. in line 9.
Drink,Ingredient,Amount,IngredientUse,Glass,HowToMix
212,Partida Reposado Tequila,2oz,Build,Collins glass,Shake with ice and strain into a chilled Collins glass filled with ice
212,Ruby Red Grapefruit Juice,2oz,Build,Collins glass,Shake with ice and strain into a chilled Collins glass filled with ice
212,Aperol,1oz,Build,Collins glass,Shake with ice and strain into a chilled Collins glass filled with ice
212,Orange Twist,1,Garnish,Collins glass,Shake with ice and strain into a chilled Collins glass filled with ice
#3 Cup,Mint Leaf,4-5,Muddle,Collins glass,Shake with ice and strain into a chilled Collins glass filled with ice
#3 Cup,Cucumber Slice,2,Muddle,Collins glass,Shake with ice and strain into a chilled Collins glass filled with ice
#3 Cup,Orange Slice,2,Muddle,Collins glass,Shake with ice and strain into a chilled Collins glass filled with ice
#3 Cup,Hine V.S.O.P. Cognac,1oz,Build,Collins glass,Shake with ice and strain into a chilled Collins glass filled with ice
#3 Cup,House Ginger Beer,1oz,Build,Col
`git pull origin [main_branch_name]`
`git checkout [merge_branch_name]`
`git pull origin [main_branch_name] --rebase`
`git push -f origin [merge_branch_name]`
@imRohan
imRohan / steps.md
Last active August 16, 2019 14:15
Convert id_rsa to pem

Convert private key

openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
chmod 600 private.pem

Convert public key

@imRohan
imRohan / steps.md
Last active November 26, 2019 15:15
Helpful RabbitMQ commands

Start a new RabbitMQ node

rabbitmq-server start -detached

Stop RabbitMQ node

sudo -u rabbitmq rabbitmqctl stop

Add a new user and password

rabbitmqctl add_user username password

Make the user a administrator

@imRohan
imRohan / blackjack.js
Created June 17, 2018 20:12
A javascript class representing a game of Blackjack
const https = require('https')
module.exports = class BlackJackGame {
constructor() {
this.game = {
deckId: null,
remaining: null,
player: {
hand: [],
count: 0
@imRohan
imRohan / transform.js
Created October 24, 2017 20:30
Perspective Transformations Based On Mouse Movement
transformElement(mouseEvent) {
const TRANSFORM_SCALE = 15
const _mouseCoords = {
x: mouseEvent.clientX,
y: mouseEvent.clientY
}
const _window = {
height: window.innerHeight,
width: window.innerWidth
}
@imRohan
imRohan / nightwatchRunner.sh
Created August 21, 2017 13:17
Nightwatch Automated Start Bash Script
#!/bin/bash
driver=$1
if [[ $# -ne 1 ]]; then
echo "Please provide a driver name (chrome or firefox)"
exit 1
fi
echo "Setting up a virtual display using Xvfb..."
@imRohan
imRohan / Nightwatch.json
Last active August 21, 2017 20:12
Nightwatch Config for Gecko and ChromeDriver
{
"src_folders": ["tests"],
"output_folder": "reports",
"selenium" : {
"start_process" : true,
"server_path" : "./node_modules/selenium-server/lib/runner/selenium-server-standalone-3.4.0.jar",
"log_path" : "",
"port" : 4444,
"start_session": true,
@imRohan
imRohan / git-reset.txt
Last active April 27, 2017 17:49
Git Undo
How to undo published commits
git reset (sha)
git checkout (all files that need to be undone)
git commit -am (message for reset)
git push -f origin (branch name)