Skip to content

Instantly share code, notes, and snippets.

View shikhir-arora's full-sized avatar
💭
¯\_(ツ)_/¯

Shikhir Arora shikhir-arora

💭
¯\_(ツ)_/¯
View GitHub Profile
@shikhir-arora
shikhir-arora / delete_dmg_after_use.sh
Last active April 2, 2024 08:33
macOS Automator / Folder Actions Script to mount, move and automatically trash .dmg files
#!/bin/bash
# Configuration file path
CONFIG_FILE="$HOME/.dmg_script_config"
# Function to setup configuration
setup_configuration() {
echo "Setting up configuration..."
read -r -p "Enter the destination path [$HOME/Applications]: " DESTINATION
DESTINATION=${DESTINATION:-$HOME/Applications} # Default to $HOME/Applications if input is empty
@shikhir-arora
shikhir-arora / .zsh_plugins.txt
Created March 24, 2024 14:33
Dotfiles - March 2024 (Antidote)
# Powerlevel10k theme for a beautiful prompt
romkatv/powerlevel10k
# Plugin for command completion suggestions
zsh-users/zsh-completions
# Syntax highlighting for the command line
zdharma-continuum/fast-syntax-highlighting
# Enables smarter navigation of directories
@shikhir-arora
shikhir-arora / sed cheatsheet
Created August 28, 2018 17:21 — forked from ssstonebraker/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
# This program will take swag.csv and create a batch of USPS
# shipping labels in one PDF file for easy printing using
# the EasyPost simple shipping API.
#
# If you have any questions about EasyPost or want help
# modifying this script for other carriers or a non-US
# source address please email us anytime at contact@easypost.com
#
# Usage:
# easypost_batch_from_csv.rb
/**
* @license
* Copyright (C) 2013 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@shikhir-arora
shikhir-arora / chromedriver.sh
Last active September 13, 2019 20:52
install latest chromedriver (dev/canary) on linux-x64
#!/bin/bash
# install latest 78 Chromedriver (https://chromedriver.chromium.org/downloads/version-selection)
# note: "Please don't rely on the LATEST_RELEASE file without a version suffix. It exists for backward compatibility only, and will be removed in the near future."
CHROME_VERSION=$(wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE_78 -q -O -)
echo "Setting up Chromedriver version $CHROME_VERSION ..."
CHROME_URL="https://chromedriver.storage.googleapis.com/${CHROME_VERSION}/chromedriver_linux64.zip"
wget -q -O /tmp/chromedriver.zip "$CHROME_URL"
@shikhir-arora
shikhir-arora / .travis.yml
Created August 31, 2019 14:34 — forked from shaypal5/.travis.yml
Comprehensive Python testing on Travis CI
language: python
# ===== Linux ======
dist: xenial
python:
- 2.7
- 3.5
- 3.6
- 3.7
matrix:
include:
{
"Thin Strokes" : 3,
"Working Directory" : "\/Users\/shikhirarora",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Green Component" : 0.88235294117647056,
"Blue Component" : 0.81176470588235294,
"Red Component" : 0.90196078431372551
},
"Rows" : 25,
{
"title": "F9 to Screencapture [Clipboard]",
"rules": [{
"description": "F9 to Screencapture [Clipboard]",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "f9"
},
"to": [{
@shikhir-arora
shikhir-arora / mv_ramdisk.sh
Last active February 10, 2019 08:13
[macOS] Quick script to move caches of some applications to memory (via. a APFS ramdisk volume mounted at /Volumes/ramdisk-apfs)
#!/bin/bash
CACHEDIR="/Volumes/ramdisk-apfs" # set our home path for the ramdisk-apfs as the CACHEDIR variable
#############################################################################
# Chrome Cache
/bin/rm -rvf ~/Library/Caches/Google/Chrome/*