Skip to content

Instantly share code, notes, and snippets.

View Zenahr's full-sized avatar
💜

Zenahr Barzani Zenahr

💜
View GitHub Profile
@Zenahr
Zenahr / license-badges.md
Created May 24, 2020 17:02 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

@Zenahr
Zenahr / gist.txt
Created May 26, 2020 18:33
Add empty branch to remote git repo
git push origin origin:refs/heads/new_feature_name
git fetch origin
git branch -r
git checkout --track -b new_feature_name origin/new_feature_name
alternative:
git checkout --orphan new-empty-branch
git rm -rf .
@Zenahr
Zenahr / sos-contribution-guide-2020.md
Created May 26, 2020 21:43
SoS 2020 Project Contribution Guide

Contribution Guide

Version: 1.0

This document describes the way we will be handling our development cycles going forward

Issues

  • Issues will be made by all of us.
  • Issues will be assigned to us. This generally helps coordinate us as a team and prevent us from working on the same issue at the same time when it doesn't make sense to do so.
@Zenahr
Zenahr / gist:22f5d376346c20d86642d772f0afe98e
Created May 28, 2020 08:05
[Git] delete local branches which do not have an equivalent on remote anymore (i.e. after merging)
git branch -vv (Check for the "gone" keyword)
git branch -d [branch-name]
voila, local garbage collection done.
This is the only safe and simple way to do this just using high-level git commands without scripting complicated and perhaps hazardous regex-based commands
@Zenahr
Zenahr / .config
Created June 7, 2020 11:21
Git Config Aliases
[alias]
ac = !git add -A . && git commit -m
lazy = !git add -A . && git commit -m && push origin
cm = commit -m
aacm = !git add -A . && git commit -m
cp = cherry-pick
amend = commit --amend -m
dev = !git checkout dev && git pull origin dev
staging = !git checkout staging && git pull origin staging
master = !git checkout master && git pull origin
ffmpeg -i video.mp4 -r 15 -vf scale=1920:-1 input.gif
@Zenahr
Zenahr / gist:2516d4184ccc78e91006a13b08963823
Last active June 13, 2020 16:02
Docusaurus Github Pages personal quick-guide

PUT THIS INTO SiteConfig.js:

const siteConfig = {
  title: 'Personal Laravel Docs and Recipes', // Title for your website.
  tagline: 'A Tagline I guess',
  url: 'https://Zenahr.github.io', // Your website URL
  baseUrl: '/docs-laravel/', // Base URL for your project */
  // For github.io type URLs, you would set the url and baseUrl like:
 // url: 'https://facebook.github.io',
@Zenahr
Zenahr / gist:21e645b3bdfd2cf4ccf13ab6bd893773
Created June 20, 2020 03:15
Convert all images inside folder using Imagemagick
mogrify -format png *.jpg
@Zenahr
Zenahr / snippets_pandoc.md
Last active July 3, 2020 22:20
Pandoc Snippets

Create pdf with table of content out of md

pandoc -s --toc -o output.pdf input.md
@Zenahr
Zenahr / ftp-batch-script-single-file-upload.md
Last active July 12, 2020 21:02
batch script - FTP single file upload

Save this in a "uploadhelper.txt" file

ftp
open [FTP HOST ADDRESS]
[FTP USERNAME]
[FTP PASSWORD]
cd [FIRST SUBDIRECTORY]
cd [SECOND SUBDIRECTORY]
put index.html
quit