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
| sub vcl_recv { | |
| if (req.restarts == 0) { | |
| set req.http.x-magic = "0"; | |
| } | |
| if (req.http.x-magic == "1") { | |
| set req.hash_always_miss = true; | |
| } | |
| } | |
| sub vcl_deliver { |
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
| $ cat foo.c; gcc foo.c; ./a.out | |
| #include <stdio.h> | |
| static | |
| void print_bitmask(int a) { | |
| int i; | |
| for (i=0;i<(sizeof(int) * 8);i++) { | |
| if(a& ((int)1<<i)) putchar('1'); | |
| else putchar('0'); | |
| if((i+1)%8 ==0) putchar(' '); |
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
| $ cat foo.c; gcc foo.c; ./a.out | |
| #include <stdio.h> | |
| main() { | |
| int i = 16777343; | |
| char *a = (unsigned char *)&i; | |
| printf("IP: %d er %hhu.%hhu.%hhu.%hhu.\n",i, a[0], a[1], a[2], a[3]); | |
| } | |
| IP: 16777343 er 127.0.0.1. |
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
| kristian@luke:~$ cat foo.c; gcc foo.c; ./a.out | |
| #include <stdio.h> | |
| main() { | |
| char a[] = { 0x00, 0x30, 0x01, 0x01, 0x5f, 0x2b, 0x00, 0, 0, 0, 0, 0xd9, 0xfe, 0x53, 0x4d, 0x42, 0x40, 0 }; | |
| int len = sizeof(a); | |
| int i; | |
| for (i = 0; i < len; i++) { | |
| if (isprint(a[i])) | |
| printf("%X %c\n", a[i], a[i]); | |
| else |
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
| 195 unsigned char *foo = (unsigned char *)&info->client_addr->sin_addr.s_addr; | |
| 196 logger(http->logger, "%hhu.%hhu.%hhu.%hhu:%d - %s %s", foo[0], foo[1], foo[2], foo[3], info->client_addr->sin_port, method, url); |
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
| sub vcl_recv { | |
| if (req.restarts == 0) { | |
| set req.http.x-magic = "0"; | |
| } | |
| } | |
| sub vcl_hit { | |
| if (obj.http.x-magic != "1") { |
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
| 10:19:53 [Mithrandir] host: ec2-54-235-235-235.compute-1.amazonaws.com root pw: spec Holmes Latoya safes |
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
| kristian@betelgeuse:~/irclogs/LINPRO$ grep 'http://' \#lp-fritt-forum.log | sed 's/@/ /g' | awk '{print $3}' | sed 's/[^a-Z]//g' | sort | uniq -c | sort -nr | head -n20 | |
| 923 bjorn | |
| 375 nilsht | |
| 364 helge | |
| 272 ojsa | |
| 234 kjetilho | |
| 203 nils | |
| 201 pkhamre | |
| 198 vegardx | |
| 196 thorkild |
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 betelgeuse { | |
| .host = "178.255.149.146"; | |
| .probe = { .url = "/tomfil"; } | |
| } | |
| import digest from "/usr/local/lib/varnish/vmods/libvmod_digest.so"; | |
| C{ | |
| #include <unistd.h> | |
| }C |
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
| root@uranus:/var/log/couchdb# head -n1 ../chef/server.log | |
| merb : chef-server (api) : worker (port 4000) ~ Starting Thin at port 4000 | |
| root@uranus:/var/log/couchdb# head -n1 ../chef/solr-indexer.log | |
| [Sun, 28 Oct 2012 06:57:08 +0100] INFO: About to change privilege to chef:chef | |
| root@uranus:/var/log/couchdb# head -n1 couch.log | |
| [Sun, 28 Oct 2012 05:57:18 GMT] [info] [<0.462.0>] 127.0.0.1 - - 'GET' /chef/_design/id_map/_view/name_to_id?include_docs=true&key=[%22role%22,%22Server%22] 200 | |
| root@uranus:/var/log/couchdb# head -n2 ../rabbitmq/[email protected] | |
| =INFO REPORT==== 28-Oct-2012::23:08:30 === |