This script is use to optimize image for web
- This script only optimize jpg and png image
- Currently this script only support debian
- jpg strip-all
- -o9
- Current folder
./imgoptim
NOTHING WORKED, postfix does not want to throttle outgoing emails.NO MORE
This will delay sending emails and put extra load on the cpu
My server normaly sends 1000-2000 emails per day, one day a client got hacked and sent out 2million of them Outgoing email workload is fairly predictable in my case add in /etc/postfix/main.cf and copy header_checks to the same location<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* @file application/libraries/Image_autorotate.php | |
*/ | |
class Image_autorotate | |
{ | |
function __construct($params = NULL) { | |
if (!is_array($params) || empty($params)) return FALSE; |
$(function(){ | |
//refresh && link | |
var hash = window.location.hash; | |
hash && $('.nav a[href="' + hash + '"]').tab('show'); | |
//back - forward | |
window.onpopstate = function(event) { | |
if(window.location.hash == ''){ | |
//no hash in url show the tab you like! | |
$('.nav a[href="#nav-home"]').tab('show'); |
#!/bin/bash | |
# Find the current encoding of the file | |
# place in $HOME/bin | |
# to mass use it | |
# find "$PWD" -type f -name "*" -exec recodeifneeded utf-8 {} \; | |
encoding=$(uchardet "$2") | |
if [[ "$1" != "${encoding}" ]] && [[ "${encoding}" != "UTF-8" ]] && [[ "${encoding}" != "unknown" ]] | |
then |
aspell --lang el dump master | aspell --lang el expand | tr ' ' '\n' > el.dic |
nohup find . -name '*.pdf' | xargs -n 1 -P 8 -I % sh -c 'ps2pdf "%" - | sponge "%";echo "%"' & |
#logging | |
logoutput: stdout | |
#debug: 1 | |
#server address specification | |
internal: 192.168.1.51 port = 1080 | |
external: eth0 | |
#server identities (not needed on solaris) | |
#user.privileged: root |
Replace slot=x | |
Replace ld ( LD not id ) with target logical disk | |
> hpacucli | |
> ctrl slot=2 show config detail | |
> ctrl slot=2 ld 1 modify size=max | |
> Warning: Extension may not be supported on certain operating systems. | |
Performing extension on these operating systems can cause data to | |
become inaccessible. See ACU documentation for details. Continue? |
./mountRPI.sh | |
// Make audio AC3 | |
ffmpeg -i input.mkv -acodec ac3 -vcodec copy -c:s copy -map 0 -analyzeduration 999999999 -probesize 999999999 ~/RPI/EXTERNAL/Tainies/output.mkv | |
// Make audio AC3 and remove Subs | |
ffmpeg -i input.mkv -acodec ac3 -vcodec copy -map 0 -map -0:s -analyzeduration 999999999 -probesize 999999999 ~/RPI/EXTERNAL/Tainies/output.mkv |