Skip to content

Instantly share code, notes, and snippets.

View wheelq's full-sized avatar
🎯
Focusing

Michal Wiczynski wheelq

🎯
Focusing
View GitHub Profile
@wheelq
wheelq / whats-the-difference-between-and
Created January 21, 2020 19:26
whats-the-difference-between-and
#https://unix.stackexchange.com/questions/129072/whats-the-difference-between-and/129077
They aren't the same. $* is a single string, whereas $@ is an actual array. To see the difference, execute the following script like so:
> ./test.sh one two "three four"
The script:
#!/bin/bash
https://www.google.com/search?client=firefox-b-d&q=workbench.settings+editor+json+vscode
@wheelq
wheelq / _bash_boilerplate.sh
Last active December 22, 2019 14:44
_bash_boilerplate.sh
#!/usr/bin/env bash
#Author: Michal <wheelq@gmail.com> Wiczynski
#Date: 2019-11-15
#Description: bash boilerplate
set -euo pipefail
IFS=$'\n\t'
source _bash_boilerplate_lib.sh
@wheelq
wheelq / iterm2-solarized.md
Created October 13, 2019 13:57 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@wheelq
wheelq / settings.json
Created August 27, 2019 18:23
VSCode Settings
{
"git.autofetch": true,
"workbench.statusBar.feedback.visible": false,
"git.confirmSync": false,
"workbench.startupEditor": "none",
"window.title": "${dirty}${activeEditorLong}${separator}${rootName}${separator}${appName}",
"files.autoSave": "afterDelay",
"window.zoomLevel": -1,
"explorer.confirmDragAndDrop": false,
"hadolint.hadolintPath": "C:\\Users\\empty\\scoop\\shims\\hadolint.EXE",
@wheelq
wheelq / samba-createuser.sh
Created August 24, 2019 16:22
Create new samba user
#!/usr/bin/env bash
# Create new samba user
# Author: Michal 'wheelq' Wiczynski <wheelq@gmail.com>
# Sources: https://linuxize.com/post/how-to-install-and-configure-samba-on-ubuntu-18-04
# https://www.howtogeek.com/howto/30184/10-ways-to-generate-a-random-password-from-the-command-line/
# https://www.ostechnix.com/4-easy-ways-to-generate-a-strong-password-in-linux/
#
# 0
#Prepare the random password
@wheelq
wheelq / install_pyenv.sh
Created August 23, 2019 11:57 — forked from ysaotome/install_pyenv.sh
pyenv install for CentOS 6.5 x86_64
#!/bin/zsh
# pyenv install for CentOS 6.5 x86_64
yum install -y gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel
git clone git://github.com/yyuu/pyenv.git ~/.pyenv
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
@wheelq
wheelq / readme.md
Last active August 22, 2019 22:13
pyenv virtualenv issue

pyenv/pyenv-virtualenv#25

brew install pyenv-virtualenv

YAY! ✔  pyenv virtualenv  13.22 Dur  23:12:55 pyenv-virtualenv: no virtualenv name given.

@wheelq
wheelq / .myaliases
Last active October 18, 2019 06:12
alias for finding files
#old alias ffile='function _myfind(){ if [ -z $1 ]; then echo "arg1-location, arg2-filename";else find $1 -type f -iname "*$2*" 2>/dev/null;unset -f __ffile;fi };_my find'
alias ffile='function __ffile(){ if [ -z $1 ]; then echo "arg1-location, arg2-filename";else find $1 -type f -iname "*$2*" 2>/dev/null;unset -f __ffile;fi }; __ffile'
@wheelq
wheelq / docker-logs.sh
Created July 31, 2019 14:08
docker-tail compose style
#!/bin/bash
# Stolen from: https://github.com/joemiller/docker-tail/blob/master/Makefile ;)
# `tail -f` the logs of one or more docker containers, with each log line prefixed
# with the container name and a color.
#
VERSION="0.1.0"
# set of colors for output. We rotate through them and re-use.
COLORS=("\x1b[31m" "\x1b[32m" "\x1b[33m" "\x1b[34m" "\x1b[35m")