Skip to content

Instantly share code, notes, and snippets.

@orhan-swe
orhan-swe / linux_commands
Last active December 1, 2021 14:06
linux cheatsheet
###############GENERAL########################
#list all folder sizes
du -a -h --max-depth=1 | sort -hr
#list by size
ls -S -l
#delete a folder
rm -rf mydir
@orhan-swe
orhan-swe / bash_scripts
Last active October 10, 2018 08:09
bash simple example scripts
#!/bin/bash
# Main Code
case $1 in
help)
echo "options:
some_help";
;;
do_something)
@orhan-swe
orhan-swe / git
Last active August 17, 2020 10:32
simple git cheatsheet
#############PUSH###################################
git status
git add <file>
git commit
#unod git add
git reset
#undo commit:
$ git reset HEAD~
@orhan-swe
orhan-swe / .vimrc
Last active January 25, 2018 12:38
" run: wget -O .vimrc_1 https://gist.githubusercontent.com/orhan-swe/d04d38e7d384ffe02eee2e21cc6a59a5/raw/db03ce2a97eb53c5e42ac67698b967d4569b2ac1/.vimrc
"let mapleader=","
set number
set hidden " have unwritten changes to a file and be able to open a new file
set tabstop=4 " default seems to be 8
set shiftwidth=4 " make indent als to 4
" set autochdir " current dir will be the current files dir, note: may give issues
set visualbell " don't beep
set noerrorbells " don't beep
set title " change the terminals title
@orhan-swe
orhan-swe / gist:b703e540f2e8b604bcb6
Created May 15, 2015 08:42
memcached and php memcached
memcached:
>sudo apt-get install memcached
>sudo apt-get install php5-memcache