This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in `find . -iname "*.jpg" -or -iname "*.png" -or -iname "*.jpeg"`;do | |
ext=${file##*.} | |
if [ -n "$ext" ]; then | |
if [ "$ext" = "jpg" ]; then | |
echo "optimizing ${file} as jpeg file with jpegtran" | |
jpegtran -copy none -optimize -perfect -outfile temp_abracadabra_filename.jpg $file | |
mv -f temp_abracadabra_filename.jpg $file; | |
fi | |
if [ "$ext" = "jpeg" ]; then | |
echo "optimizing ${file} as jpeg file with jpegtran" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
try { | |
var $_console$$ = console; | |
Object.defineProperty(window, "console", { | |
get: function() { | |
if ($_console$$._commandLineAPI) | |
throw "Sorry, for security reasons, the script console is deactivated on netflix.com"; | |
return $_console$$ | |
}, | |
set: function($val$$) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/Library/Application\ Support/WebIde70/NativeNeighbourhood/classes/org/intellij/plugins/nativeNeighbourhood/icons/macosx | |
echo '#!/bin/sh | |
# | |
# Reveal a directory in the Terminal. | |
# | |
# The script takes one argument, the qualified name of a directory. | |
# | |
# Note that the script is necessary because osascript before osx 10.4 could not | |
# pass arguments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Проверка на зависший процесс | |
$pid = '/tmp/filestart.pid'; | |
$timeout = 3 * 60 * 60; | |
if ( is_file( $pid ) ) | |
{ | |
$pidInfo = explode( '|', file_get_contents( $pid ) ); | |
if ( isset( $pidInfo[1] ) AND $pidInfo[1] + $timeout > time() ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Вывод текста через javascript, чтобы он не индексировался поисковиками. | |
* | |
* @param $str | |
* @return string|bool | |
*/ | |
function str2javascript( $str = FALSE ) | |
{ |
NewerOlder