Skip to content

Instantly share code, notes, and snippets.

@nashid
nashid / delete-large-file-from-history.md
Last active July 6, 2022 07:00
delete large file from git history
@nashid
nashid / tar-current-folder.md
Created April 25, 2022 18:09
tar: add all files and directories in current directory
tar -czf /mnt/volume1/workspace.tar.gz .
@nashid
nashid / git-large-repo-maintenance.md
Last active April 12, 2022 06:37
Make large git repo faster

Try running Prune command it will get rid off, loose objects:

git gc
git fsck
git prune
git remote prune origin

If nothing works:

@nashid
nashid / setup-eslint.md
Last active March 26, 2022 02:04
Running eslint in command line

running eslint

#install eslint in project
npm install eslint --save-dev

#initialize in root folder
node_modules/.bin/eslint --init

#Add the snippet below into "script" in package.json file.
@nashid
nashid / directory-stats.sh
Last active March 27, 2022 06:25
directory stats related command
#! /bin/bash
directory=./no_string_change_data_36k
total_size=$(du -h "${directory}" | awk '{print $1}')
echo "DIR SIZE (TOTAL): $total_size"
echo "===================================="
echo "===================================="
echo "LARGEST 10 files:"
du -a "${directory}" | sort -n -r | head -n 10
@nashid
nashid / dgl-transformer.py
Created March 12, 2022 00:50 — forked from yzh119/dgl-transformer.py
Efficient Sparse Transformer implementation with DGL's builtin operators
import dgl
import dgl.ops as ops
import numpy as np
import torch as th
import torch.nn as nn
class FFN(nn.Module):
def __init__(self, d_feat, d_ffn, dropout=0.1):
super().__init__()
self.linear_0 = nn.Linear(d_feat, d_ffn)
@nashid
nashid / dgl-transformer.py
Created March 12, 2022 00:50 — forked from yzh119/dgl-transformer.py
Efficient Sparse Transformer implementation with DGL's builtin operators
import dgl
import dgl.ops as ops
import numpy as np
import torch as th
import torch.nn as nn
class FFN(nn.Module):
def __init__(self, d_feat, d_ffn, dropout=0.1):
super().__init__()
self.linear_0 = nn.Linear(d_feat, d_ffn)
@nashid
nashid / gist:5dbac9896e5c5c212c561659a4cfa010
Created March 11, 2022 07:03 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: