Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Aadam aadimator

🏠
Working from home
View GitHub Profile
@aadimator
aadimator / tana_paste.js
Last active October 5, 2022 06:26
Tana Paste Translator
View tana_paste.js
{
"translatorID": "dda092d2-a257-46af-b9a3-2f04a55cb04f",
"label": "Tana Metadata Export",
"creator": "Stian Håklev based on Joel Chan's work",
"target": "md",
"minVersion": "2.0",
"maxVersion": "",
"priority": 200,
"inRepository": true,
"translatorType": 2,
@aadimator
aadimator / Notes Publish GH Action.yml
Created September 4, 2022 04:15
GH Action configuration file to automatically publish my Obsidian Vault using Quartz
View Notes Publish GH Action.yml
name: Publish
on:
push:
branches: [master]
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
@aadimator
aadimator / index.js
Created August 20, 2022 05:05
Add id (nanoid) YAML property to all .md files
View index.js
import { nanoid } from 'nanoid';
import {globby} from 'globby';
import matter from 'gray-matter';
import { writeFile } from 'fs';
const NOTES_DIR = "../notes_temp"
const paths = await globby(NOTES_DIR, {
expandDirectories: {
extensions: ['md']
@aadimator
aadimator / process_logseq_timestamped.js
Created February 12, 2022 17:46
LogSeq Timestamp Process
View process_logseq_timestamped.js
const notice = (msg) => new Notice(msg, 5000);
const log = (msg) => console.log(msg);
module.exports = async function processLogseq(params) {
const {app, quickAddApi: {yesNoPrompt, inputPrompt, utility}} = params;
const shouldRemove = await yesNoPrompt("Should I remove timestamps?", `If you say no, I'll process them to be default youtube timestamp links. If you say yes, I'll simply remove them.`);
let text = await utility.getClipboard();
text = text.toString();
@aadimator
aadimator / simulator_client.bat
Created October 23, 2021 06:00
Carla Simulator Scripts for EmoCaps
View simulator_client.bat
@REM start ../CarlaUE4.exe
@echo OFF
rem How to run a Python script in a given conda environment from a batch file.
rem It doesn't require:
rem - conda to be in the PATH
rem - cmd.exe to be initialized with conda init
rem Define here the path to your conda installation
@aadimator
aadimator / resume.json
Last active July 31, 2021 18:08
My Resume.json file
View resume.json
{
"basics": {
"name": "Aadam",
"email": "aadimator@gmail.com",
"phone": "+923225396069",
"location": {
"address": "Haripur, Pakistan"
},
"website": "aadimator.com"
},
@aadimator
aadimator / publish.yml
Created August 25, 2020 01:51
Workflow for auto-publishing notes using Jekyll digital-garden-template
View publish.yml
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
@aadimator
aadimator / cs221_quiz_1_solution.cpp
Created September 25, 2019 12:39
CS221 - Quiz 1 Solution
View cs221_quiz_1_solution.cpp
// Statement: Suppose we have one way linked list. Write a function to add a node in the linked list such that the resulting list is a sorted one.
#include<iostream>
using namespace std;
class List {
private:
@aadimator
aadimator / 2_add_two_numbers_leetCode.py
Created September 19, 2018 11:26
2. Add Two Numbers - LeetCode
View 2_add_two_numbers_leetCode.py
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def addTwoNumbers(self, l1, l2):
"""
:type l1: ListNode
@aadimator
aadimator / 1_two_sums_leetCode.py
Created September 19, 2018 11:16
1. Two Sums - LeetCode
View 1_two_sums_leetCode.py
class Solution:
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
dict = {}
for i in range(len(nums)):
complement = target - nums[i]