Skip to content

Instantly share code, notes, and snippets.

@kossoy
kossoy / .Laravel-Jetstream-Inertia.md
Last active October 23, 2023 08:40
Setup project with Laravel, Jetstream (FB and Google through Socialite), and Inertia.js with Vue.js
@kossoy
kossoy / bashrc.sh
Last active October 22, 2023 12:14
Elementary OS default .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# We use preexec and precmd hook functions for Bash
# If you have anything that's using the Debug Trap or PROMPT_COMMAND
# change it to use preexec or precmd
# See also https://github.com/rcaloras/bash-preexec
# If not running interactively, don't do anything
case $- in
@kossoy
kossoy / zsh-plugins.sh.
Created January 18, 2022 13:50
A few plugins for zsh
# A few plugins for zsh
@kossoy
kossoy / curl-install.sh
Created May 18, 2012 09:18
install curl
sudo apt-get install curl
@kossoy
kossoy / .Global gitignore.md
Last active March 4, 2021 22:42
Avoid pushing garbage to git repo

Global gitignore

git config --global core.excludesfile ~/global.gitignore
@kossoy
kossoy / chrome-install.sh
Last active September 20, 2016 18:34
Install chrome on ubuntu 16
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-get update
sudo apt-get install google-chrome-stable
or
@kossoy
kossoy / no_gui_boot.md
Last active August 24, 2016 17:29
Prevent GUI login ubuntu
Edit /etc/default/grub with your favourite editor, e.g. vi:
sudo vi /etc/default/grub
Find this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
@kossoy
kossoy / whatsize.sh
Last active February 26, 2016 17:18
WhatSize in shell
#!/usr/bin/env bash
# Thanks to bolk http://bolknote.ru/2011/09/14/~3407#07
function PrintBar {
if [[ $TERM =~ 256 || $TERM_PROGRAM = "iTerm.app" ]]; then
local colors=("38;5;34" "38;5;220" "38;5;160")
else
local colors=(32 33 31)
fi
@kossoy
kossoy / fixperm.sh
Created January 28, 2016 11:36
Fixing permissions downloaded files for Mac OS X
#!/usr/bin/env
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
# Apple metadata removal
xattr -dr com.apple.quarantine .
@kossoy
kossoy / filter.sh
Created August 13, 2013 04:29
Filter identical files (Mac OS X)
find . -type f -print0 \
| xargs -0 md5 \
| rev \
| sort -t \) -k1,1 -u \
| rev \
| sed -e "s/.*(\(.*\)).*/\"\1\"/"\
| xargs -J % mv % ../cleaned