Skip to content

Instantly share code, notes, and snippets.

View zuchmanski's full-sized avatar

Sebastian Zuchmanski zuchmanski

  • Paladin Software
View GitHub Profile
#include<cstdio>
#include<vector>
#include<iostream>
#define INF 2000000000
using namespace std;
int Z, n;
int A[2004];
int max_P;
#include<cstdio>
#include<vector>
#include<iostream>
#define INF 2000000000
using namespace std;
int Z, n;
int A[1002];
int max_P;
#include<cstdio>
#include<vector>
#include<iostream>
#define INF 2000000000
using namespace std;
int Z, n;
int A[1002];
int P[1002][1002];
Wolumin w stacji G to disk0s2
Numer seryjny woluminu: C89A-6620
Katalog: G:\System\Library\Extensions
2007-08-22 22:33 <DIR> ACard6280ATA.kext
2007-08-22 22:32 <DIR> ACard62xxM.kext
2007-08-22 22:32 <DIR> ACard67162.kext
2007-08-22 22:32 <DIR> ACard671xSCSI.kext
2007-08-22 22:33 <DIR> ACard6885M.kext
require 'mechanize'
require "prime"
agent = Mechanize.new
primes = Prime.new
pr = primes.next
results = []
while (pr <= 1000) do
require "rubygems"
require "xmpp4r-simple"
require "session"
USERNAME = "[email protected]"
PASSWORD = "*"
im = Jabber::Simple.new(USERNAME, PASSWORD)
sh = Session::new
Mam prosty middleware, który usuwa subdomenę "www" z requestów (zwykłe przekierowanie) - http://gist.github.com/425207
W przeglądarce wszystko działa wzorowo, problemy są z testami.
[code=ruby]host! "example.com"
root_url #=> "http://example.com/"[/code]
Przykładowy scenariusz:
- wejdź na new_post_url (przechodzi na "http://example.com/posts/new")
- ...
class NoWWW
STARTS_WITH_WWW = /^www\./i
def initialize(app)
@app = app
end
def call(env)
if env['SERVER_NAME'] =~ STARTS_WITH_WWW
1. Edit ~/.gitk:
set mainfont {Monaco 10}
set textfont {Monaco 10}
set uifont {Monaco 10}
2. Upgrade wish
sudo aptitude install tk8.5
sudo update-alternatives --config wish (select wish8.5)
#include<cstdio>
#include<vector>
#include<algorithm>
#define INF 2000000000
#define MAX 36
using namespace std;
int Z, n, S;
vector<int> l;
vector<int> A;