Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Mateja Petrovic mateja176

🎯
Focusing
Block or report user

Report or block mateja176

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View optargs.sh
#!/bin/bash
while getopts "a:" arg; do
case $arg in
a) echo "Hello $OPTARG";;
esac
done
View react-timer.tsx
const Timer = () => {
const [percentage, setPercentage] = React.useState(initialPercentage);
const [percentageTimeout, setPercentageTimeout] = React.useState(-1);
const step = (100 * updateInterval) / timeInMs;
React.useEffect(() => {
if (percentage < 100 && !paused) {
const increment = percentage + step;
View editHomePage.ts
import * as fs from 'fs';
import * as path from 'path';
const parent = 'github';
const parentPath = path.join(__dirname, parent);
const children = fs.readdirSync(parentPath);
const filters = ['google', 'favicon', 'index'];
View node-init.sh
#!/bin/bash
git init $1
cd $1
# yarn init -y
npm init -y
echo node_modules > .gitignore
yarn add -D typescript ts-node nodemon ts-jest jest @types/jest @types/node @types/express
# npm i -D typescript ts-node nodemon ts-jest jest @types/jest @types/node @types/express
View .bashrc
alias l='ls'
alias hal='ls -hal'
alias coder='code . -r'
alias doc='cd ~/Documents'
alias dow='cd ~/Downloads'
alias prog='cd ~/Programs'
alias pict='cd ~/Pictures'
export EDITOR=code
You can’t perform that action at this time.