DOCKER_IMAGE_NAME := my-docker-image DOCKER_CONTAINER_NAME := my-container DOCKER_BUILD_DIR := . DOCKERFILE := Dockerfile DOCKER_RUN_COMMAND := /bin/bash
build:
#!/usr/bin/env bash | |
# | |
# Author: @andersonbosa | |
# Description: This script generates a changelog based on Git commit history. | |
# It identifies the last release commit, parses the commit messages, and | |
# categorizes them into different sections based on semantic keys. The resulting | |
# changelog is formatted and saved to a specified file location. | |
# | |
ABSOLUTE_SCRIPT_FILE_PATH="${BASH_SOURCE:-$0}" |
interface AuthenticationService { | |
authenticate<I, O> (body: I): Promise<O> | |
} | |
class BasicAuthenticationService implements AuthenticationService { | |
async authenticate<I, O> (body: I): Promise<O> { | |
const r = { content: "authenticated" } | |
return r as O | |
} |
/* | |
In this article, we reviewed a few ways to iterate over the keys and values of enum types | |
in TypeScript. First, we used the inbuilt methods of any TypeScript object, noting that | |
they are fairly “low-level”. | |
Second, we moved to a higher-level approach, with for loops. We verified that we can teach | |
TypeScript to preserve the typing given by enums, without relying on the string or numeric | |
representation. | |
*/ | |
enum TrafficLight { |
FROM alpine:edge | |
WORKDIR /bin/app | |
RUN wget https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-amd64.tar.gz \ | |
&& tar -xzvf node_exporter-1.7.0.linux-amd64.tar.gz --directory . \ | |
&& mv -v ./node_exporter-1.7.0.linux-amd64/node_exporter /bin/node_exporter \ | |
&& chmod 777 /bin/node_exporter |
'use client' | |
import { HTMLAttributes, useEffect, useState } from 'react' | |
import { Table } from '../atoms/Table' | |
import { fetchGithubRepositoriesByUsername } from '@/app/lib/fetch' | |
import { GithubRepo } from '@/lib/types/global' | |
export type GithubRepo = { | |
name: any |
/** | |
* Allow only one call within the time limit | |
* @param { Function } func function to limited | |
* @param { Number } limit time limite in miliseconds | |
*/ | |
export function throttle (func: Function, limit: number) { | |
let inThrottle: boolean | |
return function (this: any) { | |
const args = arguments | |
const context = this |
#!/usr/bin/env bash | |
# -*- coding: utf-8 -*- | |
# This command will check every installed dependency and compare the current | |
# version with the latest version in the npm registry. It is printed out into | |
# a table outlining available versions. | |
npm outdated | |
#!/bin/bash | |
# CREATE INITIAL FILES | |
cat > package.json <<EOF | |
{ | |
"name": "@typescript/scaffold", | |
"version": "1.0.0", | |
"author": "Anderson Bosa", | |
"license": "CC0-1.0", | |
"keywords": ["typescript"], |
#!/bin/bash | |
# Author: https://github.com/andersonbosa | |
# Source: https://gist.githubusercontent.com/andersonbosa/2596ce7856f08299e0e065ccfe878bb4/raw/fd823a48c736288ab9d0b7da3cab05e2f60ff2a4/add_new_document.sh | |
set -e | |
####################################### | |
# Function to convert a string to title case | |
# Arguments: | |
# $1: String to be converted to title case |