Skip to content

Instantly share code, notes, and snippets.

View dharmaxbum1's full-sized avatar

dharmaxbum1 dharmaxbum1

  • Dharma Developer project
  • San Diego
View GitHub Profile
@dharmaxbum1
dharmaxbum1 / deployment_guide.md
Created November 10, 2019 08:35 — forked from vicgonvt/deployment_guide.md
Deployment Guide for Ubuntu Server from Scratch with Laravel
@dharmaxbum1
dharmaxbum1 / audit.rules
Created September 26, 2019 12:30 — forked from jivoi/audit.rules
Linux Auditd Best Practice Configuration
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
#
# Linux Audit Daemon - Best Practice Configuration
# /etc/audit/audit.rules
#
# Compiled by Florian Roth
@dharmaxbum1
dharmaxbum1 / postgres_queries_and_commands.sql
Created August 25, 2019 00:08 — forked from techgaun/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@dharmaxbum1
dharmaxbum1 / sysctl.conf
Created August 24, 2019 23:55 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@dharmaxbum1
dharmaxbum1 / myscript.sh
Created August 19, 2019 21:20 — forked from bradtraversy/myscript.sh
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@dharmaxbum1
dharmaxbum1 / ssh.md
Created August 19, 2019 21:19 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@dharmaxbum1
dharmaxbum1 / docker-help.md
Created August 19, 2019 21:18 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@dharmaxbum1
dharmaxbum1 / pipenv_cheat_sheet.md
Created August 19, 2019 21:17 — forked from bradtraversy/pipenv_cheat_sheet.md
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@dharmaxbum1
dharmaxbum1 / MaltegoSoup.py
Created July 22, 2018 00:25
MaltegoSoup.py
# Credit:
# github.com/deadbits
import urllib2
from bs4 import BeautifulSoup
import sys
import time
try:
tarurl = raw_input("Url to check: ")
url = urllib2.urlopen(tarurl).read()