Skip to content

Instantly share code, notes, and snippets.

View Juszczak's full-sized avatar

Adrian Juszczak Juszczak

View GitHub Profile
@Juszczak
Juszczak / git-io-custom-url.md
Created November 22, 2018 10:30 — forked from dikiaap/git-io-custom-url.md
git.io custom URL

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@Juszczak
Juszczak / .bash_profile
Created October 17, 2018 15:11 — forked from vodrazka/.bash_profile
.bash_profile
export VISUAL=vim
export EDITOR="$VISUAL"
green=$(tput setaf 2)
reset=$(tput sgr0)
PS1="\w \[$green\]$\[$reset\] "
stty -ixon
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
@Juszczak
Juszczak / TrueColour.md
Created February 6, 2018 20:17 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
@Juszczak
Juszczak / s3copy-across-aws-accounts.js
Created November 18, 2015 20:18 — forked from raffi-minassian/s3copy-across-aws-accounts.js
Quick and dirty script to copy files in AWS S3 to an S3 bucket in another AWS account with Node.js.
/*
* This is a quick and dirty script for copying files in AWS S3 to other buckets.
* This is written so it can work across AWS accounts.
* You can hack in code to apply work or logic to each file.
*
* For each file, it downloads locally to a tmp file and then starts uploading as soon as possible
* and deletes the file immediately when the upload is done.
*
* Best way to use: Spin up a micro in EC2, install node.js,
* create a directory and install the dependencies with