Skip to content

Instantly share code, notes, and snippets.

View elsayed85's full-sized avatar
💻
chilling 💤

Elsayed Kamal elsayed85

💻
chilling 💤
View GitHub Profile

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@elsayed85
elsayed85 / install-docker.sh
Created October 29, 2022 21:46 — forked from madkoding/install-docker-deepin.sh
Install Docker-CE script for Deepin Linux
#!/bin/sh
# Shell script to add docker-ce to Deepin Linux repositories
# Remove old docker
sudo apt-get remove -y docker docker-engine docker.io containerd runc
# Install dependencies
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
@elsayed85
elsayed85 / chatgpt.py
Created December 18, 2022 22:36 — forked from danielgross/chatgpt.py
Terminal ChatGPT (with API)
#!/usr/bin/env python3
"""Chat with GPT-3 from the Terminal."""
import os
import openai
if os.path.exists(os.path.expanduser("~/.openai")):
openai.api_key = open(os.path.expanduser("~/.openai")).read().strip()
else:
print("Enter your OpenAI API key: ", end="")
openai.api_key = input()
@elsayed85
elsayed85 / GPT commit message writer
Created December 18, 2022 22:38 — forked from bplunkert/GPT commit message writer
GPT writes commit messages for you
#!/bin/bash
# This file goes in .git/hooks/commit-msg
set -e
git_diff=$(cat "$1")
prompt="I want you to help me write a commit message. When I send the output of git diff, I want you to send only a suggested git commit message (only the message, no commands, nothing else), and do not send any explanation or anything else with it. Here is the git diff:\n${git_diff}"
(echo "$prompt") | openai complete - >> "$1"
@elsayed85
elsayed85 / Phpobf.php
Created February 25, 2023 07:02 — forked from Datez-Kun/Phpobf.php
Php obfuscator ,written by kakatoji
<?php
class PhpObf {
private array $names = array();
private string $nono = "\x1b[H\x1b[2J\x1b[3J";
private string $enctype = '';