docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
| egrep --color 'Mem|Cache|Swap' /proc/meminfo |
| $myString = "2010-10-10 00:00:00"; | |
| if (DateTime::createFromFormat('Y-m-d G:i:s', $myString) !== FALSE) { | |
| // it's a date | |
| } |
| tar -zxvf file.tar.gz -C <target_directory> --strip <number_of_directories_to_strip> |
| screen -r -d <screen_session_id> |
| $menuitem = MenuItem::create([ | |
| 'menu_id' => \Auth::user()->branches()->first()->id, | |
| 'name' => $customer->id, | |
| 'product_type' => $customer->cars->first()->id, | |
| 'status' => 0, | |
| 'sales_total' => 0, | |
| 'is_cancel' => false | |
| ]); |
| # iname is case insensitive | |
| sudo find . -iname "*<search_term>*" | |
| ip addr show |
| from utils.company.helpers import * | |
| email='[email protected]' | |
| company = get_company_by_email(email) | |
| from employee.models import EmployeeUser | |
| employee_obj = EmployeeUser.objects.filter(email__iexact=email.strip()) |
| Selection (Control (⌃) + Shift (⇧) + Command (⌘) + 4) | |
| Window (Control (⌃) + Shift (⇧) + Command (⌘) + 4 + Spacebar) |