THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
#!/bin/sh | |
# script for optimizing images in a directory (recursive) | |
# pngcrush & jpegtran settings from: | |
# http://developer.yahoo.com/performance/rules.html#opt_images | |
# pngcrush | |
for png in `find $1 -iname "*.png"`; do | |
echo "crushing $png ..." | |
pngcrush -rem alla -reduce -brute "$png" temp.png |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
<?php | |
/* | |
@name Server Logs Viewer | |
@description Emulates the tail() function. View the latest lines of your LAMP server logs in your browser. | |
@author Alexandre Plennevaux (pixeline.be) | |
@team Oleg Basov ([email protected]) | |
@date 16.12.2015 | |
*/ |
/* | |
* Copyright (C) 2004-2015 ZNC, see the NOTICE file for details. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.
Audio source (i.e. smartphone)
|
v
((( Wireless Bluetooth Channel )))
|
def progress_bar(iteration, total, barLength=50): | |
percent = int(round((iteration / total) * 100)) | |
nb_bar_fill = int(round((barLength * percent) / 100)) | |
bar_fill = '#' * nb_bar_fill | |
bar_empty = ' ' * (barLength - nb_bar_fill) | |
sys.stdout.write("\r [{0}] {1}%".format(str(bar_fill + bar_empty), percent)) | |
sys.stdout.flush() | |
def bar_example(): | |
for i in range(20): |
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
True fact: Mon server MariaDB s'est fait attaqué comme ça alors que le port dans l'iptable n'était pas ouvert.
#!/bin/env bash | |
# Usage : | |
# ffwebm input_file output_file [video_bitrate [audio_bitrate]] | |
INPUT=${1} | |
OUTPUT=${2} | |
BITRATE=${3:-1000k} | |
AUDIO_BITRATE=${4:-64k} |
Dear Sir/Madam: | |
I am writing to you in your capacity as data protection officer for your | |
company. In light of recent spam received on this email address, | |
I am making this request for access to personal data | |
pursuant to Article 15 of the General Data Protection Regulation. | |
I am concerned that your company’s information practices may be putting my | |
personal information at undue risk of exposure or in fact has breached its | |
obligation to safeguard my personal information. |