docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
Selection (Control (⌃) + Shift (⇧) + Command (⌘) + 4) | |
Window (Control (⌃) + Shift (⇧) + Command (⌘) + 4 + Spacebar) |
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()) |
# iname is case insensitive | |
sudo find . -iname "*<search_term>*" | |
ip addr show |
$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 | |
]); |
screen -r -d <screen_session_id> |
tar -zxvf file.tar.gz -C <target_directory> --strip <number_of_directories_to_strip> |
$myString = "2010-10-10 00:00:00"; | |
if (DateTime::createFromFormat('Y-m-d G:i:s', $myString) !== FALSE) { | |
// it's a date | |
} |
egrep --color 'Mem|Cache|Swap' /proc/meminfo |
for file in "."/* | |
do | |
curl -X POST https://content.dropboxapi.com/2/files/upload --header "Authorization: Bearer <token>" \ | |
--header "Dropbox-API-Arg: {\"path\": \"/folder1/folder2/${file:2}\",\"mode\": \"add\",\"autorename\": true,\"mute\": false}" \ | |
--header "Content-Type: application/octet-stream" \ | |
--data-binary @${file:2} | |
done |