Here's an example of how to embed a Gist on GitHub Pages:
{% gist 5555251 %}
All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type Foo struct { | |
| FirstName string `tag_name:"tag 1"` | |
| LastName string `tag_name:"tag 2"` |
| package main | |
| import ( | |
| "log" | |
| "net/http" | |
| ) | |
| func redirect(w http.ResponseWriter, r *http.Request) { | |
| http.Redirect(w, r, "http://www.google.com", 301) |
| <?php | |
| $curl = curl_init(); | |
| curl_setopt_array($curl, Array( | |
| CURLOPT_URL => 'http://blogs.guggenheim.org/map/feed/', | |
| CURLOPT_USERAGENT => 'spider', | |
| CURLOPT_TIMEOUT => 120, | |
| CURLOPT_CONNECTTIMEOUT => 30, | |
| CURLOPT_RETURNTRANSFER => TRUE, |
| # http://aaronhawley.livejournal.com/12621.html | |
| (echo -en "GET / HTTP/1.1\nHost: fropl.com\n\nGET / HTTP/1.1\nHost: fropl.com\n\n"; sleep 0.1) | telnet localhost 80 | |
| # Also: | |
| perl -e '$| = 1; print "GET / HTTP/1.1\nHost: fropl.com\n\nGET / HTTP/1.1\nHost: fropl.com\n\n"; sleep (1)' | telnet localhost 80 | |
| # Also (from https://github.com/ellzey/libevhtp/issues/86#issuecomment-19137572): | |
| (echo -en "GET /1 HTTP/1.1\r\n\r\nGET /2 HTTP/1.1\r\n\r\n"; sleep 0.1) | nc localhost 8081 |
| #!/bin/sh | |
| # shows a dB tables size in MB | |
| # usage : checkDatabaseTablesSize.sh databasename | |
| # mysql : SELECT TABLE_NAME,(DATA_LENGTH+INDEX_LENGTH)/1024/1024 FROM information_schema.TABLES WHERE table_schema="dbname"; | |
| DATABASE=$1 | |
| mysql -e "SELECT TABLE_NAME,(DATA_LENGTH+INDEX_LENGTH)/1024/1024 FROM information_schema.TABLES WHERE table_schema=\"${DATABASE}\";" |
Here's an example of how to embed a Gist on GitHub Pages:
{% gist 5555251 %}
All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.
| SQL: | |
| images int(11) unsigned DEFAULT '0', | |
| ======================================================= | |
| TCA | |
| .... | |
| 'images' => array( | |
| 'exclude' => 0, | |
| 'label' => 'images', | |
| 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( | |
| 'images', |
| #!/bin/bash | |
| # ref. : man find | |
| # printf options | |
| # %p Files name. | |
| # %P Files name with the name of the command line argument under which it was found removed. | |
| # %s Files size in bytes. | |
| # %Ak Files last access time in the format specified by k | |
| # %Ck Files last status change time | |
| # %Tk Files last modification time | |
| # Time options k |
| (function(exports) { | |
| function Universe() { | |
| this.partialAnswer = 21; | |
| } | |
| exports.Universe = Universe; | |
| // private methods | |
| var privatePrototype = { | |
| _computeAnswer: function() { | |
| return this.partialAnswer * 2; |
| <?php | |
| $template = t3lib_extMgm::extPath($this->extKey) . $this->conf['template']; | |
| $view = t3lib_div::makeInstance('Tx_Fluid_View_StandaloneView'); | |
| $view->setTemplatePathAndFilename($template); | |
| $view->assign('data', $this->data); | |
| $view->render(); |