Skip to content

Instantly share code, notes, and snippets.

View midas-kingme's full-sized avatar
🎯
Focusing

Midas midas-kingme

🎯
Focusing
View GitHub Profile
@divyajyotiuk
divyajyotiuk / get_twitter_bookmarks.py
Last active February 10, 2024 05:40
Python code to get text and link of the bookmarked tweets and save in markdown
import json
import glob
all_bookmarks = []
md_file = open("bookmarks.md", "w+") # saving in markdown file, if no file exists using '+' creates one
files = [file for file in glob.glob("JSONBookmarks/*")] # using glob to read all files from the folder
for file_name in files:
print(file_name)
with open(file_name) as bk:

Everything I Know About UI Routing

Ingredients

  1. Location
    1. pathname
    2. state
    3. search/query
    4. hash
  2. Path
@meghakrishnamurthy
meghakrishnamurthy / TwoSum.java
Created July 5, 2016 04:10
Two Sum problem - Java implementation
package megha.codingproblems.arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* Program to solve the 2 sum problem
* Problem statement - Given an array of integers, find two numbers such that they add up to a specific target number
@vasanthk
vasanthk / System Design.md
Last active November 2, 2025 18:22
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@Staticity
Staticity / StateSpaceSearch.java
Last active June 9, 2023 04:35
Examples of Breadth-First Search (BFS) and Depth-First Search (DFS)
import java.util.Map;
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Stack;
@topheman
topheman / .vimrc
Last active February 17, 2025 16:59
vim-config on Mac OS X
" Vundle config
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@FiloSottile
FiloSottile / 32.asm
Last active January 31, 2025 03:22
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4