Skip to content

Instantly share code, notes, and snippets.

View arkisoul's full-sized avatar
🌏
Digital Nomad

Arpit Jain arkisoul

🌏
Digital Nomad
  • Freelancer
  • Digital Nomad
View GitHub Profile
.fullSundae{
height:500px;
position:static;
}
.fullSundae > .iceCreamScoop{
height:100px;
}
.glass{

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

@arkisoul
arkisoul / git.txt
Created January 12, 2019 16:18
Useful Git Commands
Clone a specific branch from remote
git clone -b <branch_name> <repository>
<example>
git clone -b development https://github.com/arkisoul/salstro.git
Push a branch to a remote branch
git push <remote_name> <local_branch>:<remote_branch>
<example>
git push origin master:development
@arkisoul
arkisoul / mysql.txt
Created January 12, 2019 16:20
Useful MySql Commands
A common use of mysqldump is for making a backup of an entire database:
shell> mysqldump db_name > backup-file.sql
You can load the dump file back into the server like this:
UNIX
shell> mysql db_name < backup-file.sql
The same in Windows command prompt:
@arkisoul
arkisoul / colors.scss
Created January 12, 2019 16:21
Sass Colors
$primary-color: #EE6352;
$youtube: #D16E8D;
$articles: #FFAC83;
$community: #3F78C9;
$courses: #49C4A3;
$white: #FFF;
$black: #444A51;
$lighten: 5;
$darken: 25;
@arkisoul
arkisoul / collatz.py
Created September 14, 2019 10:46
Collatz Sequence
def collatz_sequence(x):
seq = [x]
if x < 1:
return []
while x > 1:
if x % 2 == 0:
x = x / 2
else:
x = 3 * x + 1
# Added line
@arkisoul
arkisoul / git-commit.md
Last active January 14, 2022 16:06
Write Better Git Commit Messages

5 Steps to Write Better Commit Messages

  1. Capitalization and Punctuation: Capitalize the first word and do not end in punctuation. If using Conventional Commits, remember to use all lowercase.
  2. Mood: Use imperative mood in the subject line. Example – Add fix for dark mode toggle state. Imperative mood gives the tone you are giving an order or request.
  3. Type of Commit: Specify the type of commit. It is recommended and can be even more beneficial to have a consistent set of words to describe your changes. Example: Bugfix, Update, Refactor, Bump, and so on. See the section on Conventional Commits below for additional information.
  4. Length: The first line should ideally be no longer than 50 characters, and the body should be restricted to 72 characters.
  5. Content: Be direct, try to eliminate filler words and phrases in these sentences (examples: though, maybe, I think, kind of). Think like a journalist.
<type>[optional scope]: <description>
@arkisoul
arkisoul / Communication Patterns in Angular.md
Created January 15, 2022 15:23 — forked from ReeMii/Communication Patterns in Angular.md
communications patterns in angular #angular

Angular follows a two-way data flow pattern, meaning you can send data up and down the component tree.

Everything in the Angular is a component.

Component basics

Interpolation

Interpolation is the way to inject some value into HTML. We are injecting title from the component class to the HTML.

@arkisoul
arkisoul / WhatsAppGroupContactExport.js
Created May 18, 2024 17:59 — forked from mzahidriaz/WhatsAppGroupContactExport.js
WhatsApp Group Contacts Export: This will download the members of group with their phone number, whatsapp name and if contact is stored on phone
class ContactFinder {
#db;
#chatToFind;
#dbName = "model-storage";
#chatsCol = "chat";
#contactCol = "contact";
#groupCol = "participant";
constructor(chatGroupName) {
this.#chatToFind = chatGroupName;