Skip to content

Instantly share code, notes, and snippets.

View YashKumarVerma's full-sized avatar
🎊
writing messed up code to battle AI bots. One commit at a time

Yash Kumar Verma YashKumarVerma

🎊
writing messed up code to battle AI bots. One commit at a time
View GitHub Profile
@YashKumarVerma
YashKumarVerma / script.sh
Created December 3, 2023 16:54
macos script to remind to pull out the charger
#!/bin/bash
# add this command to cron by adding this line in the file open by `crontab -e`
# `* * * * * /Users/yash/scripts/cron/battery.sh`
PATH=/usr/bin:/bin # Set the PATH to include necessary directories
export PATH
# Full paths to commands
system_profiler_path=$(which system_profiler)
@YashKumarVerma
YashKumarVerma / broken packages.ms
Created April 29, 2021 03:47
Something from this fixed my problem with unauthenticated error in Ubuntu
9874 apt --fix-broken install
9875 sudo apt --fix-broken install
9876 sudo apt-get purge ddialog
9877 sudo apt-get purge dialog
9878 sudo apt-get purge anydesk
9879 sudo apt-get purge packettracer
9880 sudo apt-get purge anydesk
9881 sudo apt --fix-broken install
9882 sudo apt --fix-broken --fix-missing install
9883 sudo apt --fix-broken install
@YashKumarVerma
YashKumarVerma / data.js
Created October 23, 2020 12:38
Country Names with dial code and short id
[
{
"name":"Afghanistan",
"dial_code":"+93",
"id":"AF"
},
{
"name":"Albania",
"dial_code":"+355",
"id":"AL"
@YashKumarVerma
YashKumarVerma / README.md
Created October 13, 2020 17:24
Running OpenJFX Applications from CLI

Use the following commands in a bash script to quickly compile and run openjfx (javafx) applications. Just make sure to set your jdk path instead of mine.

echo "Compiling :"
javac --module-path /home/yash/scripts/packages/javafx-sdk-11.0.2/lib --add-modules javafx.controls,javafx.fxml $1.java

echo "Running..."
java --module-path /home/yash/scripts/packages/javafx-sdk-11.0.2/lib --add-modules=javafx.controls -cp . $1   

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@YashKumarVerma
YashKumarVerma / vscode-cpp.json
Created May 8, 2020 04:11
Snippets for CPP development
{
"cpp": {
"prefix": ["cpp"],
"body": [
"/**",
" *@author: YashKumarVerma",
" *@desc: $1",
" *@time: $CURRENT_DAY_NAME $CURRENT_DATE-$CURRENT_MONTH_NAME-$CURRENT_YEAR $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
" **/\n",
"#include<iostream>\n",
@YashKumarVerma
YashKumarVerma / gist:9b37748c1a8bb16eb627272df5aebd9c
Created April 3, 2020 12:46 — forked from cjaoude/gist:fd9910626629b53c4d25
Test list of Valid and Invalid Email addresses
Use: for testing against email regex
ref: http://codefool.tumblr.com/post/15288874550/list-of-valid-and-invalid-email-addresses
List of Valid Email Addresses
email@example.com
firstname.lastname@example.com
email@subdomain.example.com
firstname+lastname@example.com