Skip to content

Instantly share code, notes, and snippets.

View ahmad-moussawi's full-sized avatar
🎹
Playing 🎶

Ahmad Moussawi ahmad-moussawi

🎹
Playing 🎶
View GitHub Profile
@ahmad-moussawi
ahmad-moussawi / dacpac_change_schema.sh
Created December 23, 2021 14:47
A shell script that change the schema of the SQL Server DACPAC file
#!/bin/bash
# This uitlity help to convert a dacpac from one schema to another
# taking into consideration some edge cases like when converting from/to dbo
# it assumes that you have 7-zip installed
in=${1:?Select dacpac file, usage: $0 <file>.dacpac <target_schema>}
schema=${2:?schema cannot be empty, usage: $0 <file>.dacpac <target_schema>}
# zip command
zip="/c/Program\\ Files/7-Zip/7z.exe"
@ahmad-moussawi
ahmad-moussawi / sftp-ubuntu.md
Created March 8, 2022 14:25 — forked from lymanlai/sftp-ubuntu.md
Basic tutorial for creating a SFTP-only user on Ubuntu 9.04 and greater

Adding SFTP-only user to Ubuntu Server

To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo if you're logged in as root.

Directions

  1. Edit /etc/ssh/sshd_config and make sure to add the following at the end of the file:

     Match group filetransfer
    

ChrootDirectory %h