Skip to content

Instantly share code, notes, and snippets.

View thevops's full-sized avatar
🚀

Krzysztof Łuczak thevops

🚀
View GitHub Profile
# dla testów
# ta część kodu nadpisuje wbudwaną funkcję input()
# i podaje programowi dane udając użytkownika
# ten fragment wystarczy zakomentować
# i program wróci do normalnego trybu działa
# czyli będzie pytał użytkownika o parametry
def input_values():
a = [
'6 5 14',
'1 3 1',

Keybase proof

I hereby claim:

  • I am thevops on github.
  • I am thevops (https://keybase.io/thevops) on keybase.
  • I have a public key ASAW5Ab0HDU4cJh5RdbOjJSFjYerEBs2UdklrR2WxAkuhAo

To claim this, I am signing this object:

@thevops
thevops / resize.sh
Last active March 17, 2022 21:19
Resize Cloud9 server
#!/bin/bash
# https://docs.aws.amazon.com/cloud9/latest/user-guide/move-environment.html#move-environment-resize
# 2022-03-17
# Specify the desired volume size in GiB as a command line argument. If not specified, default to 20 GiB.
SIZE=${1:-20}
# Get the ID of the environment host Amazon EC2 instance.
INSTANCEID=$(curl http://169.254.169.254/latest/meta-data/instance-id)
# green
export PS1="[\$(date +%k:%M)] \[\033[1;32m\]\u@\H:\[\033[00m\]\[\033[01;34m\]\$PWD\[\033[00m\] #\[\033[00m\] "
# red
export PS1="[\$(date +%k:%M)] \[\033[1;31m\]\u@\H:\[\033[00m\]\[\033[01;34m\]\$PWD\[\033[00m\] #\[\033[00m\] "
# https://streamlink.github.io/install.html#linux-and-bsd
streamlink "https://www.youtube.com/watch?v=haeDest4BSE" 720p,best -o output.ts
ffmpeg -i output.ts -c copy output.mp4
@thevops
thevops / useful_git.sh
Created December 8, 2021 19:29
Useful GIT commands
git grep random $(git rev-list --all)
git log -p -- cloudfront-s3/cloudfront.tf
@thevops
thevops / cr-1.txt
Created December 8, 2021 19:28
Code Review: How many lines changed
╭─ ~/Documents/code/app some-feature-branch 14:46:22
╰─❯ git diff --stat $(git merge-base HEAD develop)
ci_cd/scripts/file1.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
ci_cd/scripts/file2.txt | 17 +++++++++++++++++
ci_cd/scripts/file3.txt | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 195 insertions(+), 72 deletions(-)
@thevops
thevops / gist:72c78720f6b93f8226ebb86cd1a3d3d6
Created December 8, 2021 19:25
Code Review: list changed files
╭─ ~/Documents/code/app some-feature-branch
╰─❯ git diff --name-only $(git merge-base HEAD develop)
.gitlab-ci.yml
some/dir/file1.txt
some/dir/file2.txt
some/dir/file3.txt
some/dir/file4.txt