Skip to content

Instantly share code, notes, and snippets.

View nirgeier's full-sized avatar

Nir Geier nirgeier

View GitHub Profile
@nirgeier
nirgeier / Delete all facebook members (all the one visible on a given page)
Last active July 27, 2020 08:25
Delete all facebook group members on a given page. Usage: Copy this script, open developers console (F12) in chrome (win) and paste this script. The script will delete all the members that you can see in the given page. Once the script is done you should see a blank members page,
/**
* This script will delete all group members which are displayed in a given page.
*
* @author: Nir Geier
*
* Usage:
* Load as many users as you need, then open console and paste this script in teh console.
* Once the script finished executing you will be see blank members page, reload the next
* page and start the process again.
*
@nirgeier
nirgeier / gitTips.sh
Last active February 11, 2016 10:20
Daily git tips Collection
#
# This file will contain the collection of git tips whic are posted here:
# https://www.facebook.com/groups/git.dvcs/
#
# -----------------------------------------
# 42
#
# Here we wil use the git log command to display all the local commits on any
# branch which has not pushed yet to the server
@nirgeier
nirgeier / ajax-exercises.txt
Created August 23, 2017 23:12 — forked from pamelafox/ajax-exercises.txt
AJAX Exercises
Exercise: Nutrition Facts
Create an empty webpage.
Download nutrition.xml from https://gist.github.com/3000322 and place in your project folder.
Use AJAX via jQuery or JS API to fetch the file into the page.
Create a table. For each <food> in the XML file, create a row in the table with the food name and nutritional facts - serving size, calories, carbs.
Bonus: Use the tablesorter jQuery plugin to make the table sortable by the nutritional facts.
Exercise: Lady Gaga News
@nirgeier
nirgeier / GitScripts.sh
Last active February 26, 2019 10:11
Gti scripts
# Get last commit timestap of all branches in the remote
git fetch --all && for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
Acai
Aceola
Alfalfa Sprouts
Apple
Apricot
Apricots
Artichoke
Asian Pear
Asparagus
Atemoya
@nirgeier
nirgeier / generateSANCertificate.sh
Created February 23, 2020 19:28
Generate SAN Certificate
#############################################################################
## Usage: ##
## ##
## *** Requirements - CA certificate, privateKey & password ##
## ----------------------------------------------------------------------- ##
## Open git bash ##
## ##
## - Save this file as <fileName>.sh ##
## - Set the desired domains under [ alt_names ] ##
## or set the domains in array ##
@nirgeier
nirgeier / gitbash-az
Created April 28, 2020 21:36
Add az command to Git-bash
# Add az (Azure cli) to git bash
echo "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} ${15} > "%USERPROFILE%\AppData\Local\Programs\Git\mingw64\bin\az"
# without `:` the values are optionals
while getopts abc flag;
do
case "${flag}"
in
a ) echo $optarg ; pa="$OPTARG"; echo $pa;;
b ) pb=${OPTARG};;
c ) pc=${OPTARG};;
\?) echo "Invalid option: kubde" 1>&2 ;;
: ) echo "Invalid option: $OPTARG requires an argument" 1>&2;;
@nirgeier
nirgeier / get-latest-tag-on-git.sh
Created October 7, 2020 14:46 — forked from rponte/get-latest-tag-on-git.sh
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples