Skip to content

Instantly share code, notes, and snippets.

@pchhetri
pchhetri / ccdl.command
Created January 21, 2024 23:54 — forked from ayyybe/ccdl.command
Adobe Offline Package Builder v0.1.2 (macOS only) --- No longer being maintained.
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@pchhetri
pchhetri / README.md
Last active February 28, 2024 17:26
OS X iMessage (Messages) database merger

OS X iMessage (Messages) database merger

Use it at your own risk! You might end up worse than before. Backup everything beforehand. Twice.

If you have the Messages app setup in multiple Macs with the same Apple ID you may end up with iMessages (or SMS) scattered around all of these Macs. This is because after a certain time the new iMessages (or SMS) recevied will cease to push to devices afer a certain time has elapsed. Thus, if a computer has been offline for some period of time it won't get the new iMessages.

Each Messages instance stores the information in a SQLite database, to consolidate all these databases run the script below. This is where the Messages app stores the SQLite database under ~/Library/Messages, the folder contents will look like as follows:

  • chat.db
@pchhetri
pchhetri / 0_reuse_code.js
Created June 19, 2016 01:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am pchhetri on github.
  • I am pchhetri (https://keybase.io/pchhetri) on keybase.
  • I have a public key whose fingerprint is A82D 6B6F 4BB5 8FA9 C375 C38A BD5B 6625 BB3E D202

To claim this, I am signing this object:

@pchhetri
pchhetri / Lexi.java
Created September 25, 2015 04:45
Simple lexicography
import java.util.Scanner;
public class Lexi {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.println("Please enter your FIRST word: ");
String inputA = reader.next();
System.out.println("Please enter your SECOND word: ");
String inputB = reader.next();
@pchhetri
pchhetri / .bash_profile
Last active August 29, 2015 14:27 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
#! /usr/bin/env python3
'''pyCookieCheat.py
2015022 Now its own GitHub repo, and in PyPi.
- For most recent version: https://github.com/n8henrie/pycookiecheat
- This gist unlikely to be maintained further for that reason.
20150221 v2.0.1: Now should find cookies for base domain and all subs.
20140518 v2.0: Now works with Chrome's new encrypted cookies.
See relevant post at http://n8h.me/HufI1w