This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import usb | |
import sys | |
VENDOR_ID = 0x1532 # Razer | |
PRODUCT_ID = 0x010e # BlackWidow / BlackWidow Ultimate | |
USB_REQUEST_TYPE = 0x21 # Host To Device | Class | Interface | |
USB_REQUEST = 0x09 # SET_REPORT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run the following command in a root shell: | |
# | |
# bash <(curl -s RAW_URL) | |
function print_green { | |
echo -e "\e[32m${1}\e[0m" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$resource = Mage::getModel('catalog/category')->getResource(); | |
$connection = $resource->getReadConnection(); | |
$table = $resource->getEntityTable(); | |
if (Mage::helper('catalog/category_flat')->isEnabled()) { | |
// Is not EAV based | |
$table = $resource->getMainTable(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CONCAT(LPAD('', level, '-'), catalog_category_entity_varchar.value) | |
FROM catalog_category_entity | |
LEFT JOIN catalog_category_entity_varchar | |
ON (catalog_category_entity.entity_id = catalog_category_entity_varchar.entity_id) | |
WHERE catalog_category_entity_varchar.attribute_id | |
= (SELECT attribute_id | |
FROM eav_attribute | |
WHERE attribute_code = 'name' AND entity_type_id = ( | |
SELECT entity_type_id | |
FROM eav_entity_type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Baseline setting to Include for SSL sites | |
SSLEngine on | |
# Intermediate configuration, tweak to your needs | |
SSLProtocol all -SSLv2 -SSLv3 | |
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA | |
SSLHonorCipherOrder on | |
SSLCompression off | |
SSLOptions +StrictRequire |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Name: RPMforge RPM Repository for RHEL 6 - dag | |
### URL: http://rpmforge.net/ | |
[rpmforge] | |
name = RHEL $releasever - RPMforge.net - dag | |
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge | |
mirrorlist = http://mirrorlist.repoforge.org/el6/mirrors-rpmforge | |
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge | |
enabled = 0 | |
protect = 0 | |
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEST_HOST=$1 | |
DEST_PORT=$2 | |
SRC_IP=`/sbin/ifconfig | grep "inet addr:" | cut -d ":" -f2 | cut -d " " -f1 | head -1` | |
SRC_ROLE=`cat /etc/motd` | |
echo -n -e "$SRC_ROLE\t$SRC_IP\t$DEST_HOST\t$DEST_PORT\t" | |
nc -w3 -z $DEST_HOST $DEST_PORT > /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"***************************************************************************** | |
"" NeoBundle core | |
"***************************************************************************** | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
" Required: | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum -y install re2c httpd-devel libxml2-devel libicu-devel openssl-devel bzip2-devel curl-devel enchant-devel libjpeg-turbo-devel libpng-devel gmp-devel openldap-devel libmcrypt-devel readline-devel recode-devel zlib-devel libedit-devel libxslt-devel | |
./configure \ | |
--with-config-file-scan-dir=/etc/php.d \ | |
--with-config-file-path=/etc/php.ini \ | |
--with-apxs2 \ | |
--with-pear \ | |
--enable-bcmath \ | |
--enable-calendar \ | |
--enable-exif \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mogrify -path OUTPUT_PATH \ | |
-filter Triangle \ | |
-define filter:support=2 \ | |
-thumbnail OUTPUT_WIDTH \ | |
-unsharp 0.25x0.25+8+0.065 \ | |
-dither None \ | |
-posterize 136 \ | |
-quality 82 \ | |
-define jpeg:fancy-upsampling=off \ | |
-define png:compression-filter=5 \ |