Skip to content

Instantly share code, notes, and snippets.

View theqwan-chengwei's full-sized avatar

Cheng Wei theqwan-chengwei

  • The Qwan 得寬科技
  • Taipei, Taiwan
View GitHub Profile
@lukaswhite
lukaswhite / ClearBeanstalkdQueueCommand.php
Last active March 20, 2023 08:11
Clear a Beanstalkd Queue in Laravel
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class ClearBeanstalkdQueueCommand extends Command {
/**
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(
@gg7
gg7 / cve-2015-7547.yml
Last active August 5, 2016 02:15
CVE-2015-7547 Ansible playbook
- hosts: all
remote_user: root
tasks:
- name: Apt-get update
apt: update_cache=yes cache_valid_time=3600
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- name: Check if libc6 is installed (apt)
command: dpkg-query -W libc6
register: libc6