Skip to content

Instantly share code, notes, and snippets.

View diraneyya's full-sized avatar

Orwa Diraneyya diraneyya

View GitHub Profile
@diraneyya
diraneyya / fix-svn-export.sh
Created July 20, 2024 11:04
Fix workflows that used `svn export` to download a part of a repository from GitHub in 2024
if [ $# -ne 5 ] && [ $# -ne 4 ]; then
echo "Usage: `basename $0` <github_user> <github_repo> <branch> <dest_dir> [<repo_dir>]"
echo
echo "if <repo_dir> is omitted then the entire repo archive is unpacked into <dest_dir>"
exit 0
fi
DEST_DIR=./$4
SOURCE_URL=https://github.com/$1/$2/archive/refs/heads/$3.tar.gz
if [ $# -ne 5 ]; then

A COUNTRY CALLED GHANA

Ghana is a very peaceful but crazy place to live. Ghana is a country in the West Africa, where the people living in are black and are called Ghanaians. It was first named GOLD COST, because it was blessed with gold and was full of natural resources, Ghana gained her independence on 6th March 1957.

The first president to govern ghana was Osagyefo Dr Kwame Nkrumah. The common language spoken in ghana is English but the traditional or local language in ghana is Twi, there are many dishes in ghana but the best and popular dish in ghana is Fufu, fufu is a dish made from cassava and yam or plantain together, the ghanaian dance is called "Adowa", and the ghana popular costume is "Kente". Ghana is a country ruled with written constitution and every four years election takes place to select a new president. Ghana has many political parties but the most popular parties which has ruled the country for the past 24 years are National Democratic Congress (NDC) and New Patriotic Party

CREATIVE SOLUTIONS FOR FIRST NON-REPEATING CHARACTER DOJO

DOJO Links:

Solution by Manisha/Sveta, modified for case-insensitive test cases

checks if a character is non-repeating by looking for the 2nd match in a string and ensuring that this 2nd match exists. Based on String.prototype.indexOf (check the second usage in the Syntax section on MDN).

// Challenge one: Add all the numbers in array
array.reduce((a, e) => a + e);
// Challenge two: Create a string with all the numbers stitched in one string
array.join('')
array.reduce((a, e) => `${a}${e}`)
array.reduce((a, e) => '' + a + e);
array.reduce((a, e) => a + e.toString(), '');
array.reduce((a, e) => a + e, '');
array.reduce((a, e) => a.toString() + e.toString());
gantt
dateFormat  YYYY-MM-DD
title Example of how to add a GANTT diagram to README.md using mermaid in GitHub-flavoured markdown
excludes weekdays 2014-01-10

section A section
Completed task            :done,    des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d