Skip to content

Instantly share code, notes, and snippets.

View projectoperations's full-sized avatar
💭
building learning and connections

projectoperations projectoperations

💭
building learning and connections
View GitHub Profile
@projectoperations
projectoperations / wsl.md
Created March 3, 2024 03:19 — forked from bingzhangdai/wsl.md
Common settings for WSL

The common settings for WSL

These are recommended steps for setting up your WSL

Mount disk C: with "metadata" flag

This will allow users to set the owner and group of files using chmod/chown and modify read/write/execute permissions in WSL.

  1. unmount drvfs
@projectoperations
projectoperations / httpd-vhosts.conf
Created March 5, 2024 04:23 — forked from zhenyu-whu/httpd-vhosts.conf
My Localhost Apache Virtual Host Config.
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
@projectoperations
projectoperations / apache-conf.md
Created March 5, 2024 04:23 — forked from hoandang/apache-conf.md
Sample vhost configuration

Sample apache vhost configuration

Udate /etc/hosts or c:\windows\system32\drivers\etc\hosts file so that the new servername is mapped to 127.0.0.1

Apache config file changes document root

    DocumentRoot "/Users/hoan/www"
<Directory "/Users/hoan/www">
    #

Possible values for the Options directive are "None", "All",

# https://hub.docker.com/repository/docker/aleleba/code-server
FROM codercom/code-server:3.12.0
RUN sudo apt-get update
#Instalando Node.js
RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
RUN sudo apt -y install nodejs
#Terminando de Instalar Node.js
@projectoperations
projectoperations / analyze.ts
Created March 18, 2024 03:55 — forked from MarcMogdanz/analyze.ts
Security.txt
const moment = require("moment");
const sqlite3 = require("sqlite3").verbose();
type SecurityTxt = {
// attributes
acknowledgments: Array<string>; // optional
canonical: Array<string>; // optional
contact: Array<string>; // required
encryption: Array<string>; // optional
expires: string; // required, max once
@projectoperations
projectoperations / .gitconfig
Last active September 6, 2024 21:02 — forked from dwcullop/.gitconfig
Sample of git config file (Example .gitconfig)
[user]
name = project operations
email = [email protected]
[core]
editor = \"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"-n\"
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol,space-before-tab
tabwidth=4
excludesfile = ~/.gitignore-global
symlinks = false
@projectoperations
projectoperations / docker-api-port.md
Created May 4, 2024 20:17 — forked from styblope/docker-api-port.md
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@projectoperations
projectoperations / Vagrantfile
Created May 4, 2024 20:30 — forked from mike-hearn/Vagrantfile
Multi-machine Vagrant config with private networking
# -*- mode: ruby -*-
# vi: set ft=ruby :
boxes = [
{
:name => "server1",
:eth1 => "192.168.205.10",
:mem => "1024",
:cpu => "1"
@projectoperations
projectoperations / Docker-compose.yml
Created May 7, 2024 00:15 — forked from 2tony2/Docker-compose.yml
Example Docker Compose for DBT devcontainer
version: '3'
volumes:
local-dbt-env-shell-history: # This basically let's docker auto-manage this volume.
services:
local-dbt-env:
profiles:
- development
platform: linux/amd64 # We force the platform for consistency.
import subprocess
def get_docker_containers():
try:
# Run the docker ps command with the specified format
result = subprocess.run(['docker', 'ps', '--no-trunc', '--format', '{{.ID}}|{{.Image}}|{{.Command}}|{{.RunningFor}}|{{.Status}}|{{.Ports}}|{{.Names}}'],
stdout=subprocess.PIPE, text=True, check=True)
output = result.stdout
except subprocess.CalledProcessError as e:
print(f"Error executing command: {e}")