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
| server { | |
| listen 80; | |
| listen 443 ssl; | |
| server_name ~^(?<user>[a-zA-Z0-9-]+)\.example\.com$; | |
| location / { | |
| resolver 8.8.8.8; | |
| rewrite ^([^.]*[^/])$ $1/ permanent; | |
| proxy_pass_header Set-Cookie; | |
| proxy_pass $scheme://example.com/user/$user$request_uri; |
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
| from scrapy.spider import BaseSpider | |
| # Requires this patch: | |
| # https://github.com/joehillen/scrapy/commit/6301adcfe9933b91b3918a93387e669165a215c9 | |
| from scrapy.selector import PyQuerySelector | |
| class DmozSpiderPyQuery(BaseSpider): | |
| name = "pyquery" | |
| allowed_domains = ["dmoz.org"] | |
| start_urls = [ |
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 | |
| /* | |
| Plugin Name: Remote Login | |
| Description: Log into the site with creds that work on remote site (as defined in plugin). The remote site must have XML-RPC enabled. | |
| Author: Kailey Lampert | |
| Author URI: http://kaileylampert.com/ | |
| THIS IS NOT COMPLETE - DO NOT USE IN PRODUCTION | |
| The remote site (defined below in $server) is the "master" site. |
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
| import simplejson | |
| import json | |
| def put(data, filename): | |
| try: | |
| jsondata = simplejson.dumps(data, indent=4, skipkeys=True, sort_keys=True) | |
| fd = open(filename, 'w') | |
| fd.write(jsondata) | |
| fd.close() | |
| except: |
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 | |
| // remove_accents: https://codex.wordpress.org/Function_Reference/remove_accents | |
| add_filter('sanitize_file_name', 'sa_sanitize_spanish_chars', 10); | |
| function sa_sanitize_spanish_chars ($filename) { | |
| return remove_accents( $filename ); | |
| } |
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
| /* if portrait mode is detected, rotate the entire site -90 degrees to hint rotating to landscape */ | |
| @media (orientation: portrait) { | |
| body { | |
| -webkit-transform: rotate(-90deg); | |
| -moz-transform: rotate(-90deg); | |
| -o-transform: rotate(-90deg); | |
| -ms-transform: rotate(-90deg); | |
| transform: rotate(-90deg); | |
| } | |
| } |
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 add_action( 'admin_init', function(){ add_action( 'dbx_post_sidebar', function(){ ?> | |
| <style type="text/css"> | |
| .char-limit.over-limit{ | |
| color: red; | |
| } | |
| .char-limit.over-limit:after{ | |
| content: ' LIMITE DE CARACTERS ATINGIDO. POR FAVOR REVISE O SEU TEXTO'; | |
| color: red; |
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
| backend default { | |
| .host = "127.0.0.1"; | |
| .port = "81"; | |
| } | |
| acl purge { | |
| "localhost"; | |
| } | |
| # Rutine to try and identify device |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <modification> | |
| <id>SEO - Custom url - adaptado de http://www.davidchc.com.br/tutoriais/opencart-tutoriais/transformando-as-outras-url-do-opencart-em-amigaveis/</id> | |
| <version>1.0</version> | |
| <vqmver>2.2.1</vqmver> | |
| <author>jroqueweb</author> | |
| <file name="catalog/controller/common/seo_url.php"> | |
| <operation> | |
| <search position="before" index="1"><![CDATA[public function index() {]]></search> | |
| <add><![CDATA[ |