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
| vcl 4.0; | |
| import std; | |
| import directors; | |
| import saintmode; | |
| # dig +noall +answer +short srv _http._tcp.update.freebsd.org | sort -k 2,2nr | while read priority weight port target; do printf "backend %s {\n\t.host = \"%s\";\n\t.port = \"80\";\n}\n" ${target//.*} $target; done | |
| backend update5 { | |
| .host = "update5.freebsd.org."; | |
| .port = "80"; | |
| } | |
| backend update6 { |
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
| require 'ip' | |
| grammar BindConf | |
| include IP | |
| rule entries | |
| (zone / key / server)* { | |
| %w(zone key server).each do |i| | |
| module_eval <<-eot, __FILE__, __LINE__+1 | |
| def each_#{i}(&block) |
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
| def diag(seize,neuf,inch,pixels) | |
| ratio = (seize**2+neuf**2)**0.5 | |
| cms = inch*2.54 | |
| taille = [seize, neuf].map {|v| (v*cms/ratio).round(2)} | |
| taille << (taille[0]/pixels*10).round(4) | |
| taille << pixels*neuf/seize | |
| return taille | |
| end |
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
| (* | |
| Module: Named | |
| parses /etc/namedb/named.conf | |
| Author: Mathieu Arnold <mat@FreeBSD.org> | |
| About: Reference | |
| This lens tries to keep as close as possible to the bind documentation where | |
| possible. An online source being : | |
| http://www.freebsd.org/cgi/man.cgi?query=syslog.conf&sektion=5 |
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
| require 'socket' | |
| require 'openssl' | |
| require 'net/ftp' | |
| module Net | |
| class FTPTLS < FTP | |
| def login(user = "anonymous", passwd = nil, acct = nil) | |
| @ctx = OpenSSL::SSL::SSLContext.new('SSLv3') | |
| @ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
| voidcmd("AUTH TLS") |
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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'dnsruby' | |
| module Dnsruby | |
| class RR | |
| class DS | |
| def rdata_to_string | |
| if (@key_tag != nil) |
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
| #!/bin/sh | |
| if [ -z $1 ] | |
| then | |
| echo "$0 zones" | |
| exit 1 | |
| fi | |
| for zone in $@ | |
| do |
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' ?> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
| <html xmlns='http://www.w3.org/1999/xhtml'> | |
| <head> | |
| <title>Films</title> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| //<![CDATA[ | |
| var start = 9; | |
| var end = 23; |
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
| #!/usr/bin/env ruby | |
| input = $stdin.readlines.map do |l| | |
| l.chomp! | |
| title = true | |
| l.split(/\s+/).inject([""]) do |acc, a| | |
| if /^\d?\d:\d\d$/ =~ a | |
| title = false | |
| acc << a.sub(/^0/, '') | |
| elsif title |
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
| tell application "System Events" | |
| repeat | |
| delay 0.05 | |
| try | |
| click UI element "Suivant" of window 1 of application process "iTunes" | |
| end try | |
| end repeat | |
| end tell |