Skip to content

Instantly share code, notes, and snippets.

View wall-e-08's full-sized avatar
😠
?

Debashis Roy Bhowmik wall-e-08

😠
?
View GitHub Profile
@wall-e-08
wall-e-08 / zip_subfolders.py
Created July 17, 2024 19:09
Zip subfolder to keep backup easily ignoring sub-subfolders
import os
import zipfile
def zip_project_subfolders(directory):
# Sub-subfolders to ignore
ignore_folders = {'.idea', '.git', 'env', 'node_modules'}
for item in os.listdir(directory):
item_path = os.path.join(directory, item)
if os.path.isdir(item_path) and item != 'the_project_you_dont_want_to_keep':
sv_cheats 1
This command allows cheat codes to be used on the practice server.
sv_infinite_ammo 1
This command gives you limitless ammunition and eliminates the need to reload.
sv_grenade_trajectory_prac_pipreview 1
This command gives you a preview of where the grenade will land.
sv_grenade_trajectory_prac_trailtime 15
@wall-e-08
wall-e-08 / snort-personal-cookbook.sh
Last active April 17, 2024 18:54
SNORT cookbook
###############################
##### SNORT rule creator ######
# http://snorpy.cyb3rs3c.net/ #
###############################
# Test configuration file
sudo snort -T -i enp0s3 -c /etc/snort/snort.conf
# ping alert #01
@wall-e-08
wall-e-08 / vim-cookbook.txt
Last active April 18, 2024 17:22
VIM personal cookbook
to modify lines=>
:<start_line_number>,<end_line_number>s/<regex>/<text>
for example to add comment on start from line 5 to 10: ":5,10s/^/#"
to undo this: ":5,10s/^#//"
@ECHO OFF
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDPrivate
:CONFIRM
echo Are you sure to lock this folder? (Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
@wall-e-08
wall-e-08 / solution.md
Created March 5, 2021 12:04 — forked from lgg/solution.md
JetBrains intellij idea + NVM + nodejs + WebStorm

NVM + WebStorm

If you get error:

run npm command gives error "/usr/bin/env: node: No such file or directory

in file watcher

@wall-e-08
wall-e-08 / 2019-https-localhost.md
Created January 17, 2021 09:20 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

const gulp = require('gulp');
const plumber = require('gulp-plumber');
const notify = require('gulp-notify');
const sass = require('gulp-sass');
const pug = require('gulp-pug');
const rename = require('gulp-rename');
const auto_prefixer = require('gulp-autoprefixer');
const browser_sync = require('browser-sync').create();
const _slugify = str => {
str = str.toLowerCase();
str = str.replace(/[^a-z0-9 -]/g, '') // remove invalid chars
.trim() // remove starting or ending whitespace before replacing whitespace
.replace(/\s+/g, '-') // collapse whitespace and replace by -
.replace(/-+/g, '-'); // collapse dashes
return str;
}
@wall-e-08
wall-e-08 / install-django-2.2.4.sh
Last active August 17, 2019 19:26
One command install django(tested with django=2.2.4) with virtual_env, id, password and all apps in one project folder
#!/bin/bash
#--------------------------------------------
#---- Developer: Debashis Roy Bhowmik -------
#---- Email: debashis.buet08@gmail.com ------
#----------- Website: debashis.me -----------
#-- Github: https://github.com/wall-e-08/ ---
#--------------------------------------------
set -e # Exit immediately if a command exits with a non-zero status.