Skip to content

Instantly share code, notes, and snippets.

View DanBrown47's full-sized avatar
💭
You can’t have great software without a great team

Danwand DanBrown47

💭
You can’t have great software without a great team
View GitHub Profile
@DanBrown47
DanBrown47 / bintree.c
Created December 17, 2022 02:42
Binary Search Tree
/* Binary Search Tree Implementation in C */
#include<stdio.h> // Standard library for IO
#include<stdlib.h>// Standard library
struct TreeNode // The node used to build the tree
{
int data;
struct TreeNode* left;
struct TreeNode* right;
@DanBrown47
DanBrown47 / .bashrc
Created January 21, 2022 12:06
Bashrc file for a new server setup
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@DanBrown47
DanBrown47 / temperature.c
Created October 21, 2021 15:38
C code for getting temperature in Raspberry Pi
#include <stdio.h>
int main(int argc, char *argv[])
{
FILE *fp;
int temp = 0;
fp = fopen("/sys/class/thermal/thermal_zone0/temp", "r");
fscanf(fp, "%d", &temp);
printf("CPU Temp: %.2f°C\n", temp / 1000.0);
@DanBrown47
DanBrown47 / command.sh
Created August 2, 2021 07:10
To minimize a window on clicking icon in dock bar or task bar of POP OS
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize-or-previews'