Skip to content

Instantly share code, notes, and snippets.

View vassilevsky's full-sized avatar
👾

Ilya Vassilevsky vassilevsky

👾
  • FunBox
  • Ulyanovsk, Russia
  • 04:22 (UTC +04:00)
View GitHub Profile
class Something
def initialize(foo:, bar:)
@foo = foo
@bar = bar
end
# Публичный метод
# Можно использовать barewords (foo, bar)
# При этом снаружи их нельзя получить
11:23 ~/tmp$ mkcd backblaze
11:23 ~/tmp/backblaze$ wget https://docs.backblaze.com/public/hard-drive-data/2014_data.zip
--2015-06-15 11:23:32-- https://docs.backblaze.com/public/hard-drive-data/2014_data.zip
Resolving docs.backblaze.com... 162.244.57.13, 162.244.57.15, 162.244.57.16, ...
Connecting to docs.backblaze.com|162.244.57.13|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 587251635 (560M) [application/.zip]
Saving to: '2014_data.zip'
2014_data.zip 100%[===============================================================================================================>] 560.05M 746KB/s in 31m 0s s
@vassilevsky
vassilevsky / failures.csv
Created June 12, 2015 15:37
Backblaze drive failures. Extracted from data at https://www.backblaze.com/hard-drive-test-data.html The script to reproduce the resulting file is included at the end of the page.
We can't make this file beautiful and searchable because it's too large.
date,serial_number,model,capacity_bytes,failure,smart_1_normalized,smart_1_raw,smart_2_normalized,smart_2_raw,smart_3_normalized,smart_3_raw,smart_4_normalized,smart_4_raw,smart_5_normalized,smart_5_raw,smart_7_normalized,smart_7_raw,smart_8_normalized,smart_8_raw,smart_9_normalized,smart_9_raw,smart_10_normalized,smart_10_raw,smart_11_normalized,smart_11_raw,smart_12_normalized,smart_12_raw,smart_13_normalized,smart_13_raw,smart_15_normalized,smart_15_raw,smart_183_normalized,smart_183_raw,smart_184_normalized,smart_184_raw,smart_187_normalized,smart_187_raw,smart_188_normalized,smart_188_raw,smart_189_normalized,smart_189_raw,smart_190_normalized,smart_190_raw,smart_191_normalized,smart_191_raw,smart_192_normalized,smart_192_raw,smart_193_normalized,smart_193_raw,smart_194_normalized,smart_194_raw,smart_195_normalized,smart_195_raw,smart_196_normalized,smart_196_raw,smart_197_normalized,smart_197_raw,smart_198_normalized,smart_198_raw,smart_199_normalized,smart_199_raw,smart_200_normalized,smart_200_raw,sma
@vassilevsky
vassilevsky / bamboo.conf
Created June 3, 2015 22:15
Upstart job for Bamboo server (/etc/init/bamboo.conf)
author "Ilya Vassilevsky <vassilevsky@gmail.com>"
description "Atlassian Bamboo Server"
start on runlevel [2345]
stop on runlevel [!2345]
env JAVA_HOME=/usr/java/current
env BAMBOO_HOME=/var/lib/bamboo/data
export JAVA_HOME
class Foo
alias_method :baz,
def bar
puts "Bar"
end
end
diff --git a/.document b/.document
index 3d618dd..3bab9e5 100644
--- a/.document
+++ b/.document
@@ -1,5 +1,2 @@
lib/**/*.rb
-bin/*
--
-features/**/*.feature
-LICENSE.txt
@vassilevsky
vassilevsky / kcl_iommu.c.patch
Created February 17, 2014 17:35
kcl_iommu.c patch for processors without IOMMU
--- /usr/src/fglrx-13.251/kcl_iommu.c 2014-02-17 21:29:13.223891465 +0400
+++ /usr/src/fglrx-13.251/kcl_iommu.c 2014-02-17 21:29:54.562852777 +0400
@@ -187,11 +187,13 @@
*/
int ATI_API_CALL KCL_IOMMU_CheckInfo( KCL_PCI_DevHandle pcidev)
{
+#ifdef IOMMUV2_SUPPORT
struct pci_dev* pdev = (struct pci_dev*)pcidev;
if ( pdev->dev.archdata.iommu )
{
@vassilevsky
vassilevsky / osm2wall.sh
Created October 15, 2013 15:10
Как отрендерить открытую карту Ульяновска себе на обои
#!/bin/sh
wget http://data.gis-lab.info/osm_dump/dump/latest/RU-ULY.osm.pbf
osm2pgsql RU-ULY.osm.pbf
# git clone https://github.com/gravitystorm/openstreetmap-carto
cd ~/tmp/openstreetmap-carto
git pull
# sudo npm install -g carto
@vassilevsky
vassilevsky / gist:5793574
Created June 16, 2013 21:51
BountySource scraper
#!/usr/bin/env ruby
require "httparty"
require "pry"
bounties = []
issue_id = 0
errors_count = 0
until errors_count > 10
@vassilevsky
vassilevsky / gist:5793567
Created June 16, 2013 21:49
All BountySource issues with bounties (out of 1115 issues)
$5.0 for https://www.bountysource.com/#issues/704-log-errors-to-syslog-5-00
$5.0 for https://www.bountysource.com/#issues/703-request-sortable-tables-in-userlist-5-00
$5.0 for https://www.bountysource.com/#issues/638-fix-erroric-console-output-5-00
$5.0 for https://www.bountysource.com/#issues/644-use-an-array-for-web-breadcrumbs-5-00
$5.0 for https://www.bountysource.com/#issues/646-admin-setchan-does-not-accept-wildcards-for-chan-5-00
$5.0 for https://www.bountysource.com/#issues/654-make-allowed-ips-to-work-with-cidr-subnets-instead-of-string-wildcards-5-00
$5.0 for https://www.bountysource.com/#issues/658-webadmin-show-in-user-page-if-the-module-is-already-loaded-as-global-module-5-00
$5.0 for https://www.bountysource.com/#issues/662-nickserv-module-doesn-t-save-password-in-webadmin-interface-5-00
$5.0 for https://www.bountysource.com/#issues/663-allow-use-of-x-forwarded-for-5-00
$5.0 for https://www.bountysource.com/#issues/672-webadmin-control-codes-realname-editor-5-00