Skip to content

Instantly share code, notes, and snippets.

View chauhankiran's full-sized avatar
🐢
Slow

KC chauhankiran

🐢
Slow
View GitHub Profile
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
padding: 0;
margin: 0;
}
@chauhankiran
chauhankiran / node-folder-structure-options.md
Created July 19, 2024 15:07 — forked from lancejpollard/node-folder-structure-options.md
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
@chauhankiran
chauhankiran / main.c
Last active January 31, 2023 15:10
A life of the editor (see the revision/history to get more idea)
#include<stdlib.h>
#include<gtk/gtk.h>
GtkWidget *window;
GtkTextBuffer *text_buffer;
char *filename;
void quit_editor(GtkWidget *widget, gpointer data) {
gtk_main_quit();
}
@chauhankiran
chauhankiran / swap-ctrl-alt-gnome.md
Created August 8, 2022 09:30 — forked from dchenk/swap-ctrl-alt-gnome.md
Swap CTRL and ALT keys on GNOME

Swap CTRL and ALT keys on GNOME

From here: https://askubuntu.com/a/101877

Create a file called .Xmodmap in your home directory.

$ vim ~/.Xmodmap

Add the following lines to the file:

@chauhankiran
chauhankiran / Lox.js
Last active July 22, 2022 17:41
Raw (unoptimized and very bad) implementation of Lox language
// A Lox programming language.
const fs = require("fs");
const readline = require("readline");
// Global variables.
let source = "";
let start = 0;
let current = 0;
let line = 1;
let tokens = [];
@chauhankiran
chauhankiran / laravel-login.md
Created December 25, 2020 05:04
Laravel 8.x Login System

Laravel v8 Login System

Create a new Laravel project.

$ laravel new login-system
$ cd login-system
$ code .
$ php artisan serve
@chauhankiran
chauhankiran / quotes.md
Last active March 6, 2022 06:42
A collection of some liked quotes.

Quotes

Quotes with Cite

"When the enemy is making a false movement we must take good care not to interrupt him." - Napoleon

"The Ada language is infamous among programmers as challenging to write without compile-time errors, but once working, is trusted to run safety-critical systems such as the Boeing 777 aircraft." - Chapter 01 of Introduction to Compilers and Language Design by Douglas Thain.

Quotes from Experience

Vala: The Programming Language

"Programs must be written for people to read, and only incidentally for machines to execute." - Abelson & Sussman, SICP, preface to the first edition

There are almost infinite ways to write an application for GNU/Linux system. You can choose any of one stack and then create an application for GNU/Linux system. For example, if you are using GNU/Linux system with KDE then you can use C++ or if you are using GNU/Linux system with GNOME then you have many options such as C, C++, Python, JavaScript, PHP and few more. You might use electron (Please be mercy on your memory and don’t use it).

But GNOME strongly support C language. Because, GNOME itself is written in C. For the other languages GNOME give binding to use. But, there are two languages - Vala and Genie which have strong support like C for GNOME because both languages are developed by GNOME