Skip to content

Instantly share code, notes, and snippets.

View tarikwaleed's full-sized avatar
🧑‍💻
Steadily Building .. Steadily Building

Tarik Waleed tarikwaleed

🧑‍💻
Steadily Building .. Steadily Building
View GitHub Profile
@kashifulhaque
kashifulhaque / NvChad.md
Last active September 22, 2024 03:12
Neovim stuff with NvChad

Neovim keybinds

  • Capital letters do the opposite of small letters in command (Press shift to trigger capital letters)
  • _ (underscore) to move the cursor at the beginning of line (doesn't switch to insert mode)
    • 0 (zero) moves the cursor to the zeroth position of the line (doesn't switch to insert mode)
  • $ (dollar) to move the cursor at the end of line (doesn't switch to insert mode)
  • d$ will delete from wherever your cursor is till the end of the line
  • f<character> to move cursor to the first occurrence of <character>
    • f( to move cursor to first occurence of (
  • t<character> to move cursor to upto but not on the first occurrence of <character>
  • t( to move cursor to first occurence of (
@tarikwaleed
tarikwaleed / bubbleLinked.c
Created November 25, 2022 13:54 — forked from muhammedeminoglu/bubbleLinked.c
This code shows you how to use linked list on bubble sort.
#include <stdio.h>
#include <stdlib.h>
struct node{
int data;
struct node *next;
};
struct node* start = NULL;
@outlinepix
outlinepix / bubble_sort_LinkedList.c
Created August 17, 2022 08:36
Bubble sort on Linked List by values in C language.
/* full implimentationof Linked List : https://github.com/outlinepix/LinkedList */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct Node
{
int data;
struct Node *next;
@iam-hussain
iam-hussain / default HTTP
Last active September 22, 2024 02:43
Serve nextJS app from a port through NGINX reverse proxy HTTP and HTTPS
# Serve nextJS app from a port through NGINX reverse proxy (HTTP)
# Path: /etc/nginx/sites-available/default
# Default server configuration for HTTP
server {
server_name www.DOMAINNAME.com DOMAINNAME.com;
# Serve any static assets with NGINX
location /_next/static {
alias /home/ubuntu/PROJECT_FOLDER/.next/static;
@JustAyush
JustAyush / react-select-with-rhf.tsx
Created September 14, 2021 11:59
React Select usage with react-hook-form
import {
Button,
FormControl,
FormErrorMessage,
FormLabel,
Link,
SimpleGrid,
Stack,
} from '@chakra-ui/react';
@cse031sust02
cse031sust02 / Dockerfile
Last active June 2, 2024 09:39
Basic Dockerfile for Django using Pipenv
# My Django Project
# Version: 1.0
# FROM - Image to start building on.
FROM python:3
# PROJECT SETUP
# ----------------
@jjcodes78
jjcodes78 / nextjs-deploy.md
Last active September 19, 2024 06:16
Deploying NEXTJS site with nginx + pm2

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

@jtlapp
jtlapp / futureprovider_example.dart
Created September 18, 2019 04:07
FutureProvider example
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
const appTitle = 'FutureProvider Demo';
@wgopar
wgopar / MySQL_practice_problems.md
Last active June 22, 2024 14:49
MySQL Employees Sample Database exercise problems + solutions.

MySQL practice problems using the Employees Sample Database along with my solutions. See here for database installation details.

Problem 1

Find the number of Male (M) and Female (F) employees in the database and order the counts in descending order.

SELECT gender, COUNT(*) AS total_count
FROM employees 
GROUP BY gender
@entropiae
entropiae / Install pyenv on Ubuntu 18.04 + fish shell
Last active September 20, 2024 22:12
Install pyenv on Ubuntu 18.04 + Fish shell
Install pyenv on Ubuntu 18.04 + fish shell
- Install the packages required to compile Python
$ sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
- Download pyenv code from github
$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
- Define environment variable PYENV_ROOT to point to the path where pyenv repo is cloned
$ echo "set --export PYENV_ROOT $HOME/.pyenv" > ~/.config/fish/conf.d/pyenv.fish