Skip to content

Instantly share code, notes, and snippets.

View mayurah's full-sized avatar
🏔️
grooming next generation of leaders and problem solvers!

Mayur Pipaliya mayurah

🏔️
grooming next generation of leaders and problem solvers!
View GitHub Profile
@mayurah
mayurah / sips: CR2 to jpeg
Created August 9, 2017 20:42
Mass convert CR2 (Raw Image File) to JPEG in macOS command-line.
# Mass convert CR2 (Raw Image File) to JPEG in macOS command-line.
mkdir Converted
for i in *.CR2; do sips -s format jpeg $i --out Converted/$i.jpg;done
@mayurah
mayurah / macos_sierra.as
Created August 9, 2017 18:46
macOS Sierra - CLI installer Steps
0x00 - Download the macOS Sierra installer from App Store (Purchased)
0x01 - Format Flash Drive to: "OSXSierra" and choose the Format "OS X Extended (Journaled)",
0x02 - Terminal cmd> sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/OSXSierra --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
0x03 - Boot Test> Press and hold the Option (⌥) key immediately upon hearing the startup chime!
@mayurah
mayurah / status.json
Created May 19, 2017 04:12
data format for predictive analytics on services
{
"service": "transaction_api",
"timestamp": "2017-05-16T18:15:14Z",
"latency": "10ms",
"status": "up",
"description": "Transaaction API facilitates credit card processing channel communicating with multiple processors",
"overall_outage": 5,
"uptime": 99.9,
},
{
@mayurah
mayurah / byobuCommands
Created April 2, 2017 18:39 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@mayurah
mayurah / rule.php
Created April 2, 2017 17:19 — forked from shhetri/rule.php
<?php
/**
* Rule 2 : Naming
*/
$mf = new Form(); //is bad
$monitoringForm = new Form(); //is good
//this is bad
foreach ($people as $x) {
@mayurah
mayurah / gpg.commands
Created March 31, 2017 03:51
GPG Cheatsheet / PGP Encryption
# Brew Software
brew install gpg
# GNU PG Config Directory
ls -lah ~/.gnupg
# In case of stdout/tty password input issue / keybase issue
export GPG_TTY=`tty`
# Generate new key
@mayurah
mayurah / dns.as
Created March 29, 2017 19:14
DNS
# Google DNS
8.8.8.8
8.8.4.4
# OpenDNS
Preferred DNS Server: 208.67.222.123
Alternate DNS Server: 208.67.220.123
# Security
Preferred DNS Server: 198.153.192.40
@mayurah
mayurah / blogger-to-shopify.js
Last active March 26, 2017 23:09
blogspot to shopify redirect (javascript way)
// Tested on friend Dr Raley's website
// Old (Google Blogger / Blogspot): http://cecileraleydesigns.blogspot.com/
// New (Shopify): https://www.cecileraleydesigns.com/blogs/cecile-raley-designs/
// Note: This simple JS only redirects blog (containing month/day) and not home page, or dedicated pages.
var newBlog = "https://www.your-website.com/blogs/blog-name/";
var current_blogspot_slug = document.baseURI.split("/")[5].split(".")[0];
if( document.baseURI.split("/")[3] % 1 === 0 ) if( document.baseURI.split("/")[4] % 1 === 0 ) {
console.log("true - let's redirect to new home");
@mayurah
mayurah / brew-log.sh
Last active September 18, 2018 18:11
brew-log.sh
#!/bin/bash
echo List of CLI tools / packages installed through brew
echo
echo Command Line Shell For SQLite
brew install sqlite
echo Good part of this cow is that it yields informative messages if used with tweaks
brew install cowsay
echo Usage:
@mayurah
mayurah / IDM.as
Last active April 19, 2025 12:15
Internet Download Manager / Ubuntu / Wine - Raw Instructions to make it work!
To make good old Internet Download Manager (IDM) work in Linux mint / Ubuntu!
# Declaration: I totally support open source and have tried aria2, and axel; also I am frequent user and admirer of wget, curl and lynx; but the download throughput provided by IDM is unmatched for some odd reasons, specifically it performs better than other clients in mid-to-high latency networks, who knows, may be short time-outs on each connectionns or magic wand.
Some CLI examples if someone would wish to try those and compare throughput of each at 8 connections to get benchmark against IDM!
- $ aria2c --file-allocation=none -c -x 8 -s 8 -d "./location/to/downloads/" http://cachefly.cachefly.net/100mb.test
- $ axel -n 8 http://cachefly.cachefly.net/100mb.test
Below two does not suppot multi-threaded, and are made for other greater purpose :)