Skip to content

Instantly share code, notes, and snippets.

View skylock's full-sized avatar

Emanuil Copil skylock

  • Cluj-Napoca, Romania
View GitHub Profile
JavaScript Array Methods Cheat Sheet
To Mutate, Or Not To Mutate?
#javascript #todayilearned #array
---
## Methods that MUTATE an Array
brew tap homebrew/cask-fonts
brew install --cask font-cascadia-code
brew install --cask font-cascadia-code-pl
brew install --cask font-cascadia-mono
brew install --cask font-cascadia-mono-pl
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the branch you're in,
# followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
# Ex: you're on branch feature/MIT-123, and you commit your changes adding
# a message "Released 2.7 version" the actual commit message should look
@skylock
skylock / git delete multiple branches on remote using pattern
Last active December 23, 2021 08:41
git delete multiple brabches on remote using pattern
g branch -r --merged master | grep 'searchedBranch*' | sed 's/remotes\/origin\///' | xargs git push --delete origin
@skylock
skylock / docker-top.sh
Created June 19, 2020 13:14 — forked from jrenggli/docker-top.sh
List all running docker containers and their resources used
docker stats `docker inspect --format='{{.Name}}' $(sudo docker ps -aq --no-trunc) | sed -e 's/\///g'`
@skylock
skylock / Untitled-1
Last active June 27, 2024 08:34
mssql-server-docker.yml
services:
db:
image: "microsoft/mssql-server-linux"
container_name: "mssql"
ports:
- "1433:1433"
environment:
MSSQL_SA_PASSWORD: "Pass@word"
ACCEPT_EULA: "Y"%
@skylock
skylock / aws-ecs-exec-rails-db-stup.md
Last active January 31, 2020 08:00
aws ecs instance execute ruby container db reset

Add current user to docker group

sudo usermod -aG docker sssm-user
export API_CONTAINER_NAME=$(docker ps -a --filter status=running --filter  publish=3000 --format '{{.Names}}')
docker exec $API_CONTAINER_NAME bundle exec rails db:create db:schema:load db:seed:e2e
#!/usr/bin/env bash
echo "Running Cypress e2e tests headlessly without copying files"
BUILD_ENV=dev
IMAGE_TAG=cypress/included:3.4.1
CYPRESS_ARGS="--spec cypress/integration/administration/dashboard*"
RECORD_ON="--group aws-tests --ci-build-id $CODEBUILD_BUILD_ID --record"
RECORD_OFF="--record false -c video=false"
CONFIG="-e configFile=$BUILD_ENV"
DOCKER_ENV_VARS="-e "INTF_USERNAME"="$INTF_USERNAME" -e "INTF_PASSWORD"="$INTF_PASSWORD" -e "CYPRESS_RECORD_KEY"="$CYPRESS_RECORD_KEY" -e "COMMIT_INFO_BRANCH"=$CODEBUILD_SOURCE_VERSION"
# explanation of the "docker run" command line arguments
return cy.get(`[data-cy="${id}"]`).then($button => {
$button.css('border', '1px solid magenta');
$button.css('backgroundColor', 'rgba(186,62,197, 0.5)');
});
version: "3"
services:
server:
image: jetbrains/teamcity-server
ports:
- "8112:8111"
volumes:
- ./data_dir:/data/teamcity_server/datadir
- ./log_dir:/opt/teamcity/logs
teamcity-agent: