Skip to content

Instantly share code, notes, and snippets.

eat sleep code repeat

ildar r. khasanshin ildarkhasanshin

eat sleep code repeat
Block or report user

Report or block ildarkhasanshin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ildarkhasanshin /
Created Sep 1, 2019 — forked from yura/
script to PDF to JPG using pdftk and imagemagick
# Script to convert PDF file to JPG images
# Dependencies:
# * pdftk
# * imagemagick
ildarkhasanshin / parse_utm.js
Created Aug 5, 2019 — forked from hunty/parse_utm.js
Парсит UTM метки и подставляет в скрытые поля
View parse_utm.js
window.onload = function() {
// Parse the URL
function getParameterByName(name) {
var name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)");
var results = regex.exec(;
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
// Give the URL parameters variable names
var source = getParameterByName('utm_source');
ildarkhasanshin / gist:3aad191fb1da668e7eeeffeff147fca6
Created Apr 8, 2019 — forked from reinink/gist:1467201
Example of how to parse HTML document with phpQuery
View gist:3aad191fb1da668e7eeeffeff147fca6
// Include the phpQuery library
// Download at
include 'phpQuery.php';
// Load Mike Fisher's player page on
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, '');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
View php-strings-class.php
namespace System;
// простая функция для создания экземпляра класса
function strs($php_string) {
return new Strings($php_string);
ildarkhasanshin /
Created Jan 27, 2019 — forked from DOKL57/
Генератор паролей Python
import random
num = input('login ')
pas = ''
for x in range(16): #Количество символов (16)
pas = pas + random.choice(list('1234567890abcdefghigklmnopqrstuvyxwzABCDEFGHIGKLMNOPQRSTUVYXWZ')) #Символы, из которых будет составлен пароль
print('Hello, ', num, 'your password is: ', pas)
ildarkhasanshin / .htaccess
Created Jan 2, 2019 — forked from lukecav/.htaccess
Apache - Browser caching and mod_deflate for WordPress
View .htaccess
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/schema+json
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
ildarkhasanshin / .htaccess
Created Jan 2, 2019 — forked from lukecav/.htaccess
Apache mod_expires for WordPress
View .htaccess
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault “access plus 1 month”
ExpiresByType text/html "access plus 2 hours"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/js "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
## How to install mcrypt in php7.2
# Check version php and pecl
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php
ildarkhasanshin / progressive-template.html
Created Oct 2, 2018 — forked from egid/progressive-template.html
Forking the toggled progressive disclosure template found at the Campaign Monitor 2-column layout (originally at
View progressive-template.html
Progressive Disclosure Demo - Updated 15 August, 2012 by Ros
Thank you for taking a look under the hood of our progressive disclosure demo. Please note that this is a work in progress, so it's a tad messy and bound to change.
If you have any questions, feel free to pop a line to - we might learn something, too!
Known bugs
ildarkhasanshin / component.php
Created Sep 25, 2018 — forked from SerjRamone/component.php
Битрикс: Экспорт в Excel
View component.php
if ($bExcel)
// hack. any '.default' customized template should contain 'excel' page
$this->__templateName = '.default';
Header("Content-Type: application/force-download");
Header("Content-Type: application/octet-stream");
Header("Content-Type: application/download");
You can’t perform that action at this time.