This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requirements (macos) | |
# brew install imagemagick | |
# brew install jpegoptim | |
# brew install optipng | |
# Check if both arguments are provided | |
if [ "$#" -ne 2 ]; then | |
echo "Usage: $0 <source_folder> <destination_folder>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"schemaVersion":1,"label":"coverage","message":"39.1%","color":"green"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"schemaVersion":1,"label":"coverage","message":"84.6%","color":"green"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"time" | |
"google.golang.org/grpc" | |
"google.golang.org/grpc/credentials/insecure" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package repository | |
import ( | |
"context" | |
"github.com/ramadoiranedar/go_restapi/model/domain" | |
) | |
type CategoryRepository interface { | |
Create(ctx context.Context, category domain.Category) domain.Category | |
Update(ctx context.Context, category domain.Category) domain.Category |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const withBundleAnalyzer = require('@next/bundle-analyzer')({ | |
enabled: process.env.ANALYZE === 'true', | |
}) | |
const withPlugins = require('next-compose-plugins') | |
// at the moment the application version refers to git commit | |
const revision = require('child_process') | |
.execSync('git rev-parse HEAD') | |
.toString().trim() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<a | |
href="http://localhost:9096/oauth/authorize?client_id=paulthebest&redirect_uri=http://localhost:8080/oauth/redirect&response_type=code"> | |
Login | |
</a> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"os/exec" | |
"syscall" | |
"time" | |
"unsafe" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "strconv" | |
//solveFizzBuzz solves Fizzbuzz algorithm with given rules below : | |
//https://en.wikipedia.org/wiki/Fizz_buzz | |
//Count incrementally up to n : | |
//when a number is divisible by 3 replace it with Fizz | |
//when its divisible by 5 replace it with Buzz | |
//when its divisible by 5 AND 3 replace it with FizzBuzz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* calculator in javascript using functional programming principles */ | |
const operators = ["+", "*", "-", "/"]; | |
//isOperator checks if a given character is an operator | |
const isOperator = char => operators.includes(char); | |
/* all operations to be used */ | |
const operations = { | |
"/": (a, b) => a / b, | |
"*": (a, b) => a * b, |