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 MySQLdb.cursors | |
| from twisted.enterprise import adbapi | |
| from scrapy.xlib.pydispatch import dispatcher | |
| from scrapy import signals | |
| from scrapy.utils.project import get_project_settings | |
| from scrapy import log | |
| SETTINGS = get_project_settings() |
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
| script_current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) |
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 | |
| use Illuminate\Http\Request; | |
| use Symfony\Component\HttpFoundation\StreamedResponse; | |
| class XController | |
| { | |
| public function getView(Request $r, $loc='') | |
| { |
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
| ''' | |
| Spider for IMDb | |
| - Retrieve most popular movies & TV series with rating of 8.0 and above | |
| - Crawl next pages recursively | |
| ''' | |
| from scrapy.contrib.spiders import CrawlSpider, Rule | |
| from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor | |
| from scrapy.selector import Selector |
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
| # -*- coding: utf-8 -*- | |
| from PIL import Image | |
| source = [ | |
| 'picture_to_merge.page_0.jpg', | |
| 'picture_to_merge.page_1.jpg', | |
| 'picture_to_merge.page_2.jpg', | |
| 'picture_to_merge.page_3.jpg', | |
| 'picture_to_merge.page_4.jpg', | |
| ] |
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
| - template: src=templates/venv_exec.j2 dest={{ om_venv_path }}/exec mode=755 | |
| - command: "{{ om_venv_path }}/exec pip install -U pip" | |
| - command: "{{ om_venv_path }}/exec which pip" |
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 | |
| namespace App\Providers; | |
| use Silex\Application; | |
| use Silex\ServiceProviderInterface; | |
| use Symfony\Component\VarDumper\Cloner\VarCloner; | |
| use Symfony\Component\VarDumper\Dumper\CliDumper; | |
| use Symfony\Component\VarDumper\VarDumper; |
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
| # Set pid of nginx master process here | |
| pid=8192 | |
| # generate gdb commands from the process's memory mappings using awk | |
| cat /proc/$pid/maps | awk '$6 !~ "^/" {split ($1,addrs,"-"); print "dump memory mem_" addrs[1] " 0x" addrs[1] " 0x" addrs[2] ;}END{print "quit"}' > gdb-commands | |
| # use gdb with the -x option to dump these memory regions to mem_* files | |
| gdb -p $pid -x gdb-commands | |
| # look for some (any) nginx.conf text |
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
| # See docs/examples | |
| # http://doc.gitlab.com/ce/ci/quick_start/README.html | |
| # http://doc.gitlab.com/ce/ci/yaml/README.html | |
| # GitLab CI template for Go tests. Note this installs | |
| # a new working copy of Go in a non-standard path such | |
| # that sudo/root is not needed for the install stage. | |
| # note that this particular install-environment stage | |
| # is overly verbose in order to debug anything tricky |
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
| diff --git a/client.go b/client.go | |
| index 4b0c9c3..8ac98e4 100644 | |
| --- a/client.go | |
| +++ b/client.go | |
| @@ -32,6 +32,7 @@ type Call struct { | |
| Reply interface{} // The reply from the function (*struct). | |
| Error error // After completion, the error status. | |
| Done chan *Call // Strobes when call is complete. | |
| + Trace uint32 // unique id used for tracing | |
| } |