A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
from itertools import product | |
def score(self, other): | |
first = len([speg for speg, opeg in zip(self, other) if speg == opeg]) | |
return first, sum([min(self.count(j), other.count(j)) for j in 'ABCDEF']) - first | |
possible = [''.join(p) for p in product('ABCDEF', repeat=4)] | |
results = [(right, wrong) for right in range(5) for wrong in range(5 - right) if not (right == 3 and wrong == 1)] | |
def solve(scorefun): |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Attila Incze <http://atimb.me> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
/** | |
* Requires node v0.7.7 or greater. | |
* | |
* To connect: $ curl -sSNT. localhost:8000 | |
*/ | |
var http = require('http') | |
, repl = require('repl') | |
, buf0 = new Buffer([0]) |
var net = require('net') | |
var sock = net.connect(1337) | |
process.stdin.pipe(sock) | |
sock.pipe(process.stdout) | |
sock.on('connect', function () { | |
process.stdin.resume(); | |
process.stdin.setRawMode(true) |
Questa è una traduzione in italiano del celebre Hacker Manifesto. Tutte quelle | |
esistenti contengono grossolani errori, perlopiù dovuti ad una carente | |
comprensione della materia e del periodo, o in ogni caso sono poco fedeli al | |
contenuto e allo spirito dell'originale. Mi auguro che questa mia traduzione non | |
soffra degli stessi problemi. Sail strong. | |
-- FiloSottile | |
**** | |
Da: Phrack, Volume Uno, Issue 7, Phile 3 of 10 |
/* | |
* Copyright (C) 2014 Antonio Leiva Gordillo. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
/* | |
* robotMaze.js | |
* | |
* The blue key is inside a labyrinth, and extracting | |
* it will not be easy. | |
* | |
* It's a good thing that you're a AI expert, or | |
* we would have to leave empty-handed. | |
*/ |
Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar); | |
//Title and subtitle | |
toolbar.setTitle("MY toolbar"); | |
toolbar.setSubtitle("Subtitle"); | |
//Menu | |
toolbar.inflateMenu(R.menu.toolbar_menu); | |
toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() { |