Skip to content

Instantly share code, notes, and snippets.

@clevertechru
clevertechru / memcache.js
Created February 9, 2017 16:00
memcache.js pathed for nodejs 7.0
/**
* Copyright (c) 2011 Tim Eggert
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@clevertechru
clevertechru / [email protected]
Created June 7, 2017 18:23 — forked from fedir/[email protected]
Install wkhtmltopdf on Debian 8
apt-get update
aptitude install xfonts-base xfonts-75dpi fontconfig xvfb
mkdir ~/src/wkhtmltopdf -p
cd ~/src/wkhtmltopdf
wget https://bitbucket.org/wkhtmltopdf/wkhtmltopdf/downloads/wkhtmltox-0.13.0-alpha-7b36694_linux-jessie-amd64.deb
dpkg -i wkhtmltox-0.13.0-alpha-7b36694_linux-jessie-amd64.deb
echo 'xvfb-run --server-args="-screen 0, 1024x768x24" /usr/local/bin/wkhtmltopdf $*' > /usr/bin/wkhtmltopdf.sh
chmod a+rx /usr/bin/wkhtmltopdf.sh
ln -s /usr/bin/wkhtmltopdf.sh /usr/local/sbin/wkhtmltopdf
/usr/local/sbin/wkhtmltopdf https://www.google.fr output.pdf
version: '2'
services:
mysql:
image: mysql
volumes:
- .mysql:/var/lib/mysql
# - lowmem.cnf:/etc/mysql/conf.d/lowmem.cnf
environment:
MYSQL_DATABASE: bnsys_production
@clevertechru
clevertechru / remove-all-from-docker.sh
Created February 10, 2019 22:14 — forked from beeman/remove-all-from-docker.sh
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@clevertechru
clevertechru / mgo-ssl.go
Created April 20, 2021 12:36 — forked from kevinadi/mgo-ssl.go
Small example of using MongoDB go driver (mgo) to connect using SSL with client certificate
package main
import (
"fmt"
"log"
"net"
"crypto/tls"
"crypto/x509"
@clevertechru
clevertechru / export-trivy-json-as-csv.txt
Created February 20, 2024 13:33 — forked from julianoborba/export-trivy-json-as-csv.txt
Export Aquasec Trivy JSON report as flat CSV
trivy image --no-progress --light --vuln-type os -f json -o "trivy-report.json" --severity "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" "foo/bar:latest"
cat trivy-report.json
# OUTPUT:
# {
# "DockerImage": "foo/bar:latest",
# "Results": [
# {
# "Target": "foo/bar:latest (foobar 3.12.1)",