Skip to content

Instantly share code, notes, and snippets.

View HamzaAnis's full-sized avatar
:electron:
Excellence is not a skill, it's an attitude.

Hamza Anis HamzaAnis

:electron:
Excellence is not a skill, it's an attitude.
View GitHub Profile
@rxaviers
rxaviers / gist:7360908
Last active May 6, 2024 03:49
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@msrose
msrose / combining-git-repositories.md
Last active May 4, 2024 15:58
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.

@bradtraversy
bradtraversy / docker_wordpress.md
Last active May 4, 2024 09:16
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@dhjw
dhjw / donate2.php
Last active May 2, 2024 05:54
Accept BCH donations and display message instantly
<?php
// address used throughout page and script. could also just be hardcoded without PHP.
$addr = 'qqvppp5pe4sce8qyvyncdrhekgkxcyw2hczvervmp8';
?>
<html>
<head>
<title>Donate BCH</title>
<style>
body { font:16pt arial; }
#address { font:18pt arial; }
@denji
denji / golang-tls.md
Last active April 29, 2024 03:39 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@natescode
natescode / .gitconfig
Last active March 1, 2024 02:00
Git Aliases to make GIT easier to work with
[user]
email = your_email
name = your_username
[alias]
# view your global git config Aliases from CLI
aliases = config --get-regexp '^alias\\.'
# git clone
cl = !git clone
# Git shallow clone for large repos
clq= !git clone --depth=1
@codref
codref / go-ssh-reverse-tunnel.go
Last active October 23, 2023 13:32
Go SSH reverse tunnel implementation (SSH -R)
/*
Go-Language implementation of an SSH Reverse Tunnel, the equivalent of below SSH command:
ssh -R 8080:127.0.0.1:8080 operatore@146.148.22.123
which opens a tunnel between the two endpoints and permit to exchange information on this direction:
server:8080 -----> client:8080
@shiftyp
shiftyp / README.md
Last active September 30, 2022 10:26
OOP Quiz App

OOP and MVC

What and Why

One of the big leaps you'll have to make as a JavaScript developer is wrapping your head around Object Oriented Programming (OOP). This is tough, and that's ok because it's tough for everyone at first. When you start out with JavaScript you're taught to use functions as your primary way of organizing your code. This is fine, but you'll probably find that organizing your code around objects makes larger projects easier to accomplish and improve / maintain.

The cool thing is that what OOP amounts to is an organizational strategy. I have a set of related tasks, how do I go about starting the project and organizing my code? These tasks have some variables and functions that are used to accomplish them, so you create them and write the logic for them to interact. While you can write those out as detached functions and variables, making those variables and functions into properties and methods of an object can make the division between those tasks easier to see and maintain.

Maint

@sgyyz
sgyyz / docker-compose.yml
Last active July 4, 2022 04:13
Postgres & PgAdmin docker-compose.yml
version: '3'
services:
postgres:
image: postgres
ports:
- "5432:5432"
volumes:
- pg-dataset:/var/lib/postgresql/data
environment: