Skip to content

Instantly share code, notes, and snippets.

View sadn1ck's full-sized avatar

Anik Das sadn1ck

View GitHub Profile
@sadn1ck
sadn1ck / settings.json
Created July 22, 2023 07:10
vscode settings
{
"editor.fontSize": 14,
"terminal.integrated.fontSize": 14,
"editor.lineHeight": 1.75,
"editor.fontFamily": "_ Nerd Font Mono",
"terminal.integrated.fontFamily": "_ Nerd Font Mono",
"editor.accessibilitySupport": "off",
"workbench.iconTheme": "vscode-icons",
"workbench.tree.indent": 12,
"editor.cursorBlinking": "smooth",
@sadn1ck
sadn1ck / fonts.conf
Created November 22, 2021 13:35
~/.config/fontconfig/fonts.conf for beautiful fonts (make sure you have the fonts LOL)
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Set preferred serif, sans serif, and monospace fonts. -->
<alias>
<family>serif</family>
<prefer><family>SF Pro Text</family></prefer>
</alias>
<alias>
<family>sans-serif</family>
@sadn1ck
sadn1ck / crc.py
Last active October 29, 2021 11:22
Gist to calculate CRC of an input polynomial in bit-string format using modulo-2-division
def xor(a, b):
# initialize result
result = []
# Traverse all bits, if bits are
# same, then XOR is 0, else 1
for i in range(1, len(b)):
if a[i] == b[i]:
result.append('0')
@sadn1ck
sadn1ck / README.md
Last active January 9, 2022 16:13
Bakkesmod 1.95 (Season 3 Patch) Working on Arch Linux

Bakkesmod on Arch with proton-tkg 6.5

Packages Needed

└❯ pacman -Qs mingw
local/mingw-w64-binutils 2.35.1-1 (mingw-w64-toolchain mingw-w64)
    Cross binutils for the MinGW-w64 cross-compiler
local/mingw-w64-crt 8.0.0-1 (mingw-w64-toolchain mingw-w64)
    MinGW-w64 CRT for Windows
@sadn1ck
sadn1ck / App.js
Created July 15, 2020 04:27
App.js for react-ml5-p5
import React, { Component } from "react";
// import * as p5 from 'p5';
import * as ml5 from 'ml5';
import Sketch from "react-p5";
class App extends Component {
constructor(props) {
super(props);
this.state = {
options: {
@sadn1ck
sadn1ck / README.md
Last active July 11, 2020 15:52
Installing & Using Font Awesome 5 in VueJS
$ yarn add -D @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons @fortawesome/free-brands-svg-icons @fortawesome/free-regular-svg-icons @fortawesome/vue-fontawesome

Update src/main.js accordingly

Usage:

<font-awesome-icon :icon="['far', 'user-secret']"/>
<font-awesome-icon :icon="['fab', 'facebook']" />
@sadn1ck
sadn1ck / setup_git.md
Last active October 28, 2020 12:28
Setting up git

Setup git for the first time

  • git config --global user.name "your name"
  • git config --global user.email "yourEmail@email.com"
  • git config --global color.ui true

Setting up passwordless commits:

  • ssh-keygen -t rsa -C "yourEmail@email.com"
  • name it something like githubssh (generic, I know)
  • cat ~/.ssh/githubssh.pub
  • Copy that output and go to