This file contains 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 __future__ import print_function | |
import pycurl | |
print(pycurl.version) | |
c = pycurl.Curl() | |
c.setopt(pycurl.URL, 'https://packages.graylog2.org/repo/debian/dists/trusty/0.92/binary-amd64/Packages') | |
c.setopt(pycurl.PROXY, 'my_proxy') |
This file contains 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
-> % http -p Hh http://localhost:8123/ "If-Modified-Since: Thu, 07 Jan 2016 11:42:12 GMT" | |
GET / HTTP/1.1 | |
Accept: */* | |
Accept-Encoding: gzip, deflate | |
Connection: keep-alive | |
Host: localhost:8123 | |
If-Modified-Since: Thu, 07 Jan 2016 11:42:12 GMT | |
User-Agent: HTTPie/0.9.2 | |
HTTP/1.1 200 OK |
This file contains 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
-> % http --headers http://localhost:8123/ "If-Modified-Since: Thu, 07 Jan 2016 12:10:31 GMT" | |
HTTP/1.1 200 OK | |
Connection: keep-alive | |
Content-Encoding: gzip | |
Content-Type: text/html | |
Date: Thu, 07 Jan 2016 12:21:06 GMT | |
Last-Modified: Thu, 07 Jan 2016 11:42:13 GMT | |
Server: nginx/1.4.6 (Ubuntu) | |
Transfer-Encoding: chunked |
This file contains 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
num = 0.7 | |
print(num) | |
num += 0.1 | |
print(num) | |
--> | |
0.7 | |
0.7999999999999999 |
This file contains 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
@gewinnzahlen = sort(NummernSort @gz); | |
sub NummernSort { | |
if($a < $b){ | |
return -1; | |
} elsif ($a == $b){ | |
return 0; | |
} else { | |
return 1; |
This file contains 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
var args = require('system').args; | |
var webpage = require('webpage'); | |
var page = webpage.create(); | |
var url = args[1]; | |
page.viewportSize = { | |
width: 1024, | |
height: 768 | |
}; | |
page.open(url, function () { | |
console.log(page.renderBase64('PNG')); |
This file contains 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 GetDate | |
{ | |
@Months = ('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'); | |
@Now = localtime(time()); | |
$Month = $Months[$Now[4]]; | |
$Year = $Now[5]+1900; | |
$todaydate = localtime(time()); | |
@day = split(/ +/,$todaydate); | |
@time = split(/:/,$day[3]); | |
return "$Year$Month$Now[3]_$time[0]$time[1]$time[2]"; |
This file contains 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
<VirtualHost *:80> | |
ServerName test_file | |
DocumentRoot /tmp/test/htdocs | |
<Location "/"> | |
Require all granted | |
</Location> | |
<Files "test.html"> | |
AuthType Basic |
This file contains 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
Ubuntu 12: | |
testuser@ubuntu12:~$ grep http_proxy /etc/environment | |
http_proxy="http://foo.example.com:8080" | |
testuser@ubuntu12:~$ sudo su - -c env |grep http_proxy | |
http_proxy=http://foo.example.com:8080 | |
testuser@ubuntu12:~$ sudo env |grep http_proxy | |
http_proxy=http://foo.example.com:8080 | |
testuser@ubuntu12:~$ env |grep http_proxy | |
http_proxy=http://foo.example.com:8080 |
This file contains 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 | |
$uuid = $_GET['uuid']; | |
if ($uuid) { | |
} | |
?> |