Skip to content

Instantly share code, notes, and snippets.

@h3mantD
h3mantD / pint.json
Created June 5, 2024 04:32 — forked from JustSteveKing/pint.json
Laravel Pint configuration
{
"preset": "per",
"rules": {
"align_multiline_comment": true,
"array_indentation": true,
"array_syntax": true,
"blank_line_after_namespace": true,
"blank_line_after_opening_tag": true,
"combine_consecutive_issets": true,
"combine_consecutive_unsets": true,
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
/* Created by h3mantD */
#include <bits/stdc++.h>
using namespace std;
// printing and scanning statements...
#define print(x) cout << #x << "=" << x << "\n"
#define print2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << "\n"
#define pi(x) printf("%d\n", x)
#define pl(x) printf("%lld\n", x)
@h3mantD
h3mantD / pint.json
Created November 20, 2023 13:25
Laravel Pint configuration file
{
"preset": "laravel",
"rules": {
"align_multiline_comment": true,
"array_indentation": true,
"blank_line_after_namespace": true,
"blank_line_after_opening_tag": true,
"combine_consecutive_issets": true,
"combine_consecutive_unsets": true,
"concat_space": {
@h3mantD
h3mantD / pre-commit
Created March 23, 2022 10:42
pre-commit hook for laravel projects.. It will check if the code has debugging statements `e.g dd(), dump(), print_r()` or not
#!/bin/bash
C_RESET='\e[0m'
C_RED='\e[31m'
C_GREEN='\e[32m'
C_YELLOW='\e[33m'
function __run() #(step, name, cmd, debugStatementsCheck)
{
local color output exitcode
@h3mantD
h3mantD / .bashrc
Created October 11, 2021 11:31
bash custom commands
# .bashrc
# User specific aliases and functions
alias la='ls -la'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias cls='clear &&'
@h3mantD
h3mantD / bfs.cpp
Last active October 5, 2020 12:28
best first search using heuristic technique cpp code
/*
Author : Hemant Durdhawale
e-mail : [email protected]
*/
#include<bits/stdc++.h>
using namespace std;
//N = [Number of edges the tree or graph has] + 1
#define N 10
import urllib.request
import string
def find_string(string,sub_string):
return string.find(sub_string)
url = input()
try:
data = urllib.request.urlopen(url)
#!/bin/bash
# Color
red='\e[31m'
green='\e[32m'
blue='\e[34m'
white='\e[97m'
echo "*** setting up a environment for running a tool ***"
@h3mantD
h3mantD / hiddenParam.sh
Created July 11, 2020 11:50
Finds the hidden parameters
for url in $(cat $1);
do
hide=$(curl -s -L $url | egrep -o "('\")hidden('|\") name=('|\")[a-z_0-9-]*]" |\
sed -e 's/\"hidden\"/[Found]/g' -e 's, 'name=\"','"$url"/?', g' |\
sed 's/.*/&=XssCheck/g');
echo -e "\033[32m$url""\033[34m\n$hide";
done