Skip to content

Instantly share code, notes, and snippets.

@kossoy
kossoy / zsh-plugins.sh.
Created January 18, 2022 13:50
A few plugins for zsh
# A few plugins for zsh
@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 / .Laravel-Jetstream-Inertia.md
Last active November 17, 2024 16:08
Setup project with Laravel, Jetstream (FB and Google through Socialite), and Inertia.js with Vue.js
@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 / 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 / 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 / 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 / htop_install.sh
Created October 12, 2015 08:53
htop on Mac OS X
curl -O http://themainframe.ca/wp-content/uploads/2011/06/htop.zip
unzip htop.zip
sudo mv htop /bin
rm htop.zip
@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
@kossoy
kossoy / index.html
Created October 3, 2012 17:11
Sticky header and footer with scrollable content
<!DOCTYPE html>
<meta charset="utf-8">
<style>
* {
font-family: Arial, sans-serif;
font-size: 1em;
}
body, html {