Skip to content

Instantly share code, notes, and snippets.

View ruvasik's full-sized avatar
👁️‍🗨️
I'm looking for job

Vladimir Alekseev ruvasik

👁️‍🗨️
I'm looking for job
View GitHub Profile
<?php
if (ini_get('short_open_tag') == 0 && strtoupper(ini_get('short_open_tag')) != 'ON')
die('Error: short_open_tag parameter must be turned on in php.ini');
?><?
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
@ini_set('pcre.backtrack_limit', 1024*1024);
define('IP_LIMIT_DEFAULT', '#IP'.'_LIMIT_PLACEHOLDER#');
define('IP_LIMIT', '#IP_LIMIT_PLACEHOLDER#');
@ruvasik
ruvasik / sequential_rename.applescript
Last active December 26, 2016 15:29
Renaming files (jpg) in the folders to sequential numbers order starting with 1 in every folder
set text item delimiters to "."
tell application "Finder"
set the_folder to choose folder
set the_subfolders to every folder in the_folder
repeat with index from 1 to the count of the_subfolders
set this_folder to item index of the_subfolders
set img_files to (every file in this_folder whose name ends with ".jpg")
repeat with indexf from 1 to (the count of img_files)
set this_file to item indexf of img_files
set file_name_count to text items of (get name of this_file)