Skip to content

Instantly share code, notes, and snippets.

Marin Bînzari SpartakusMd

Block or report user

Report or block SpartakusMd

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
@SpartakusMd
SpartakusMd / .gitconfig
Last active Aug 26, 2016
Default .gitconfig
View .gitconfig
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
@SpartakusMd
SpartakusMd / app.php
Created May 26, 2016
Replacement for default Symfony2 app.php
View app.php
<?php
use Symfony\Component\Debug\Debug;
use Symfony\Component\HttpFoundation\Request;
/**
* @var Composer\Autoload\ClassLoader
*/
$loader = require __DIR__ . '/../app/autoload.php';
// Use APC for autoloading to improve performance.
@SpartakusMd
SpartakusMd / build_php.sh
Last active Nov 20, 2018
Build a new addition version of PHP + memcached
View build_php.sh
#!/bin/bash
# Before using the script, run :
# sudo apt-get install build-essential libcurl4-openssl-dev libc-client2007e-dev
# sudo apt-get install libsqlite3-dev sqlite3 mysql-server libmysqlclient-dev libreadline-dev libzip-dev libxslt1-dev libedit-dev
# sudo apt-get install libicu-dev libmcrypt-dev libmhash-dev libpcre3-dev libjpeg-dev libpng12-dev libfreetype6-dev libbz2-dev libxpm-dev
# Sources : /usr/local/src/php5-build
# usage - build_php.sh 5.6.18
@SpartakusMd
SpartakusMd / jiraTimelogReport.js
Last active Aug 26, 2016
jiraTimelogReport.js
View jiraTimelogReport.js
var s=document.createElement('script');
s.setAttribute('src','https://code.jquery.com/jquery.js');
document.getElementsByTagName('body')[0].appendChild(s);
var issues = {};
(function($){
var issuetable = jQuery('#issuetable');
issuetable.find('tbody > .issuerow').each(function() {
var $row = jQuery(this);
@SpartakusMd
SpartakusMd / wp-disable-update.php
Created Dec 7, 2015
Disable Wordpress plugin update (ex: WPPUM)
View wp-disable-update.php
<?php
function filter_plugin_updates( $value ) {
unset( $value->response['wp-popup-magic/wp-popup-magic.php'] );
return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );
@SpartakusMd
SpartakusMd / .maintenance
Created Nov 3, 2015
Enable Worpress Maintenance mode
View .maintenance
<?php
$upgrading = time() + 100;
?>
@SpartakusMd
SpartakusMd / ajax_queue.js
Created Aug 5, 2015
Run queued AJAX requests
View ajax_queue.js
$(function () {
//setup an array of AJAX options, each object is an index that will specify information for a single AJAX request
var ajaxes = [{ url : '<url>', dataType : 'json' }, { url : '<url2>', dataType : 'xml' }],
current = 0;
//declare your function to run AJAX requests
function do_ajax() {
//check to make sure there are more requests to make
if (current < ajaxes.length) {
@SpartakusMd
SpartakusMd / rm-attack.php
Last active Aug 29, 2015
PHP script to remove one line virus attacks
View rm-attack.php
<?php
/**
* Usage:
* php rm-attack.php [pattern] [directory]
*
* php rm-attack.php '<?php $ctddbnvbtj' .
*
* At the end, a report file './report.log' will be generated with the list of files that were modified
*/
@SpartakusMd
SpartakusMd / vhost.sh
Last active Jan 23, 2017
VHost generator
View vhost.sh
#!/bin/bash
# Colors
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
@SpartakusMd
SpartakusMd / template
Last active Aug 29, 2015
VHost template
View template
<VirtualHost *:80>
ServerName template.url
ServerAlias www.template.url
ServerAdmin template.email
DocumentRoot template.webroot
<Directory template.webroot/>
Options +FollowSymLinks
AllowOverride All
You can’t perform that action at this time.