Skip to content

Instantly share code, notes, and snippets.

View m4tlch's full-sized avatar
🏠
Working from home

Paul Nike m4tlch

🏠
Working from home
  • Ukraine
View GitHub Profile
@m4tlch
m4tlch / find_bug.php
Created May 24, 2016 10:37
How find where bug in PHP
<?php
$e = new \Exception;
var_dump($e->getTraceAsString());
#!/bin/bash
# Version 0.1 Tuesday, 07 May 2013
# Comments and complaints http://www.nicknorton.net
# GUI for mouse wheel speed using imwheel in Gnome
# imwheel needs to be installed for this script to work
# sudo apt-get install imwheel
# Pretty much hard wired to only use a mouse with
# left, right and wheel in the middle.
# If you have a mouse with complications or special needs,
# use the command xev to find what your wheel does.
$alter = array(
'max_length' => 60,
'ellipsis' => TRUE,
'word_boundary' => FALSE,
'html' => FALSE,
);
$message = views_trim_text($alter, $message);
@m4tlch
m4tlch / drupal-colorbox.js
Created March 31, 2016 10:31
JS: Responsive ColorBox Drupal
/*
==========================================================================
$Colorbox Responsive
* How to make colorbox responsive
* see @ https://www.drupal.org/node/2154099
==========================================================================
*/
(function ($, Drupal, window, document, undefined) {
//Configure colorbox call back to resize with custom dimensions
@m4tlch
m4tlch / wget-files-cyrillic-friendly.sh
Created February 20, 2016 20:29 — forked from DmitrySandalov/wget-files-cyrillic-friendly.sh
Download all files from website using wget (+encoding)
#!/bin/zsh
wget -m -p -E -k -K -np --restrict-file-names=nocontrol http://site/path/
@m4tlch
m4tlch / 01-gulpfile.js
Created February 17, 2016 10:40 — forked from markgoodyear/01-gulpfile.js
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),
@m4tlch
m4tlch / gulpfile.js
Created February 17, 2016 09:23 — forked from sawadays0118/gulpfile.js
【gulp】livereloadxを実行する ref: http://qiita.com/sawadays0118/items/7e953244a9543d5b6be1
var gulp = require('gulp'),
exec = require('child_process').exec;
gulp.task('livereloadx', function(){
exec('livereloadx -s -p 8000');
});
gulp.task('livereloadx', ['livereloadx']);
<input onkeyup="value=value.replace(/[^0-9\.]/g,'')" />
<input onblur="if(value.match(/[^0-9\.]/)) raise_alert(this)" />
@m4tlch
m4tlch / win-clear.bat
Last active March 8, 2023 18:36
Чистка обновлений-жучков, отключение телеметрии Windows 7/8/10
@echo off
echo
echo Step 1: Delete Updates...
echo Delete KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249
echo Delete KB3080149 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3080149
echo Delete KB3021917 (telemetry for Win7)
start /w wusa.exe /uninstall /kb:3021917
@m4tlch
m4tlch / 1) readme.md
Last active August 26, 2015 11:50 — forked from aaronwaldon/1) readme.md
How to set up Gulp for Compass compilation and minification, JavaScript minification, livereloading, and use with ExpressionEngine.

How to set up Gulp with an ExpressionEngine project

I freaking love working with technologies like Grunt and Gulp, and wanted to share how to get my current EE front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, Craft, etc).

Install Node.js

  • If Node is not yet installed on the machine, it will need to be installed

Install Gulp (if needed)