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
$ apt-cache rdepends libgnutls26 | grep -v lib | |
Reverse Depends: | |
aiccu | |
vino | |
qemu-kvm | |
exim4-daemon-light | |
exim4-daemon-heavy | |
cups | |
xen-utils-4.1 | |
wine1.4-amd64 |
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/bash | |
# | |
# by Sairon Istyar, 2012 | |
# distributed under the GPLv3 license | |
# http://www.opensource.org/licenses/gpl-3.0.html | |
# | |
# Source: | |
# https://github.com/saironiq/shellscripts/blob/master/torrentz_eu/torrentz_eu.sh | |
# | |
### CONFIGURATION ### |
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
puts "How many disks? " | |
n = STDIN.gets.to_i | |
x = 1 | |
while (x < (1 << n)) | |
puts "move from pole #{(x&x-1)%3} to pole #{((x|x-1)+1)%3}" | |
x += 1 | |
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
require 'epitools' | |
figlet_left = File.readlines('./figlet.input') | |
def get_first_char(i, arr) | |
arr.map { |x| x[0..i] } | |
end | |
def remove_first_char(i, arr) | |
arr.map { |x| x.slice(i..-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
require 'epitools' | |
%w[gdbm sdbm cdb].each { |lib| require lib } | |
DBS = [ | |
[GDBM, GDBM], | |
[SDBM, SDBM], | |
[CDBMake, CDB ], | |
] | |
NUM = 100000 |
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 python3 | |
from itertools import islice | |
from time import time | |
def time_generator(func, n=500000): | |
generator = func() | |
start = time() | |
islice(generator, n) | |
elapsed = time() - start |
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
lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 | |
lstat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=200704, ...}) = 0 | |
lstat("/usr/lib/ruby", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 | |
lstat("/usr/lib/ruby/gems", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 | |
lstat("/usr/lib/ruby/gems/2.1.0", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 | |
lstat("/usr/lib/ruby/gems/2.1.0/gems", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 | |
lstat("/usr/lib/ruby/gems/2.1.0/gems/slop-3.6.0", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 | |
lstat("/usr/lib/ruby/gems/2.1.0/gems/slop-3.6.0/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 | |
lstat("/usr/lib/ruby/gems/2.1.0/gems/slop-3.6.0/lib/slop.rb", {st_mode=S_IFREG|0644, st_size=19793, ...}) = 0 | |
open("/usr/lib/ruby/gems/2.1.0/gems/slop-3.6.0/lib/slop/option.rb", O_RDONLY|O_CLOEXEC) = 7 |
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 some_combination_of_the_numbers_adds_to_the_biggest_number(arr) | |
arr = arr.sort | |
biggest = arr.pop | |
(2..arr.size).each do |perm_size| | |
arr.permutation(perm_size).each do |nums| | |
sum = nums.reduce(:+) | |
return true if sum == biggest | |
end | |
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
# examples | |
spec = { | |
"apiKey" => String, | |
"language" => ["en", "ru"], | |
"clientData" => { | |
"userName" => String, | |
"userCity" => String, | |
"userPhoneNo" => String, | |
"userPassword" => String |
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
// Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
chrome.commands.onCommand.addListener(function(command) { | |
console.log('onCommand event received for message: ', command); | |
}); |