Skip to content

Instantly share code, notes, and snippets.

View mohithg's full-sized avatar
:octocat:
Coding....

Mohith G mohithg

:octocat:
Coding....
View GitHub Profile
@mohithg
mohithg / ai-writing-tools.md
Created March 13, 2022 14:11 — forked from rowe-morehouse/ai-writing-tools.md
List of AI Writing Tools: Automatic Content Generation, Paraphrasing, Summarizing, Outlining.
@mohithg
mohithg / sync-using-gitignore.sh
Last active September 14, 2020 05:51 — forked from theothermattm/sync-using-gitignore.sh
Rsync files using .gitignore
# sync everything excluding things in .gitignore
# delete anything on target not in source
# include dotfiles and symlinks, also use compression
rsync -azP --delete --filter=":- .gitignore" . my-target-host:/my/target/directory
# sync back from server
mkdir -p "$SANDBOX"
cd "$SANDBOX"
rsync -xvazP --delete "$RSYNC_REMOTE"/.git/ .git
rsync -xvazP --delete "$RSYNC_REMOTE"/.gitignore .gitignore
var dbs = db.getMongo().getDBNames()
for (var i in dbs) { db = db.getMongo().getDB( dbs[i] ); if(db.getName().length == 8) { db.dropDatabase(); } }
CREATE TABLE IF NOT EXISTS journal (
ordering BIGSERIAL,
persistence_id VARCHAR(255) NOT NULL,
sequence_number BIGINT NOT NULL,
deleted BOOLEAN DEFAULT FALSE,
tags VARCHAR(255) DEFAULT NULL,
message BYTEA NOT NULL,
PRIMARY KEY(persistence_id, sequence_number)
);
Verifying my Blockstack ID is secured with the address 1GcBc8v319t6KFQACkLApatURcFSHSH9E1 https://explorer.blockstack.org/address/1GcBc8v319t6KFQACkLApatURcFSHSH9E1
@mohithg
mohithg / sublime plugins
Last active June 6, 2018 14:07
Awesome Sublime
Package Control
GotoDefinition
GitGutter
bracket highlighter
autofilename
boxy theme
sidebar enhancement
gutter color
All autocomplete
color highlighter

Keybase proof

I hereby claim:

  • I am mohithg on github.
  • I am mohithg (https://keybase.io/mohithg) on keybase.
  • I have a public key whose fingerprint is 638E A22E 19FA A8E8 5294 A873 56E0 B170 5C2B 3598

To claim this, I am signing this object:

@mohithg
mohithg / priority queue
Created September 18, 2012 06:23
Priority queue
# include <stdio.h>
# include <conio.h>
# include <stdlib.h>
struct heapstruct
{
int capacity;
int size;
int *a;
};
int i=0;
@mohithg
mohithg / DecodeTheCode.java
Created September 3, 2012 05:24 — forked from aravindc26/DecodeTheCode.java
mobile keypad
package test.decodethecode;
import java.util.HashMap;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class DecodeTheCode {
HashMap<String, String> encodings = new HashMap<String, String>();
public void hashInit() {
@mohithg
mohithg / decode the code
Created September 1, 2012 09:47
Decode the code
# include <stdio.h>
# include <conio.h>
# include <string.h>
void main()
{
char s[10],a[3][20],x[20],e[10];
int i,j=0,n,z,y=0;
clrscr();
for(i=0;i<3;i++)
{