Skip to content

Instantly share code, notes, and snippets.

View Demwunz's full-sized avatar
:octocat:
donuts

Fazal Demwunz

:octocat:
donuts
View GitHub Profile
@Demwunz
Demwunz / git commands.md
Last active October 1, 2023 03:54
Useful git commands

Useful Git commands

A collection of useful git commands, because I'm lazy and can't be bothered to remember off by heart

delete all local branches that have been merged into master

scenario: free up space on your machine. delete anything that's been merged, no need to have it any more.

git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d
@Demwunz
Demwunz / liver_detox.md
Last active September 30, 2024 23:31
# Andreas Moritz Liver cleanse

Step 1: Preparation

  • Plan to do the gallbladder flush over a weekend or when you have a couple of days off work to allow for rest and relaxation.
  • During the week leading up to the flush, consume a diet consisting of mainly fresh fruits and vegetables, and avoid processed foods, animal fats, and dairy products.
  • It's recommended to perform a kidney cleanse before the gallbladder flush, as Moritz suggests that congested kidneys can hinder the effectiveness of the gallbladder flush.

Step 2: Apple Juice Intake

  • Starting from the sixth day before the flush, drink four glasses (32 ounces or 1 liter) of organic apple juice each day. Divide the juice into smaller servings and drink throughout the day.
  • The apple juice helps to soften gallstones and prepare the body for the flush.
@Demwunz
Demwunz / pr-template.md
Created January 12, 2021 09:44
Pull release template
@Demwunz
Demwunz / git commands.sh
Created July 3, 2020 16:47
A collection of some useful git commands
# delete all local branches that have been merged into master
git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -
# amend a commit to the current time
git commit --amend --date="now"
# add empty git commit without adding files
git commit --allow-empty -m "This will trigger a build"
@Demwunz
Demwunz / closestEl.js
Last active June 10, 2020 11:11
Little function that returns the matching node by classname. Useful in all browsers
function closestEl(elem, elClass) {
var node = elem
while (node.parentElement) {
node = node.parentElement
if (node.classList.contains(elClass)) {
break
}
}
node = node.classList.contains(elClass) ? node : elem
return node
@Demwunz
Demwunz / 3box
Created February 29, 2020 14:36
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreihaofdfkbrxqg73yvq36t3astt63owpfbtlheup5pup6hsh7d24nu ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@Demwunz
Demwunz / install.md
Created January 28, 2020 21:45
How to install Flutter on macOS using homebrew and asdf

How to install Flutter on macOS using homebrew and asdf

The official way to install the flutter and its dependencies is a mishmash of brew install, binary downloads alongside relying on system installed versions of ruby.

I became particularly frustrated when trying to setup flutter on macOS Mojave and macOS Catalina. I came across too many issues, and it took a lot of stackoverflow and google searches to overcome.

By using a package manager to install dependencies and runtimes, we can share the exact same setup in different environments and automate the install and escape the above issues.

This is particularly valuable if you use different machines, or have team members in different locations. Moreover, we know where everything belongs and how to upgrade or uninstall if necessary.

@Demwunz
Demwunz / array_without_dupes.js
Last active January 13, 2020 14:11
Remove Duplicates from Array - JavaScript
/* copied from an email */
/*The first piece we need is the Set object. This is one of the new objects available in recent versions of JavaScript.
It’s something we don’t typically use much. The Set object is very cool because it’s a collection a little like an array,
but it ONLY allows unique items. If we try to add a duplicate item to its collection, then it just silently doesn’t add the item.
So if we give it five 3’s then it will only have 1 item in it, a single 3.
The Set object’s constructor will take in any iterable object, which includes arrays. So we can give a Set an array,
and it’ll load in the elements and any duplicates won’t get loaded. We do that like this:*/
@Demwunz
Demwunz / init.vim
Last active March 27, 2021 23:21 — forked from benawad/init.vim
VSCode style Vim/NeoVim setup
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
@Demwunz
Demwunz / .bash_profile
Created December 14, 2019 21:35
Bash settings
# source the bashrc file ###########################################################
[ -r ~/.bashrc ] && . ~/.bashrc
# https://asdf-vm.com/ | brew install asdf ##########################################
. /usr/local/opt/asdf/asdf.sh
. /usr/local/opt/asdf/etc/bash_completion.d/asdf.bash
#####################################################################################
export PATH="/usr/local/sbin:$PATH"
# https://github.com/nvbn/thefuck | brew install thefuck ############################
eval "$(thefuck --alias)"