Skip to content

Instantly share code, notes, and snippets.

View pirj's full-sized avatar
🚜
Relentless

Phil Pirozhkov pirj

🚜
Relentless
View GitHub Profile
@pirj
pirj / download.bash
Last active August 29, 2015 13:57
Parallel download of audio files (10 files at a time) from VK.com. Install extension from vkopt.net, download playlist as "playlist.lst", and run `./download.bash playlist.lst`. Makes "playlist" directory.
mkdir "${1%.*}"
( cd "${1%.*}"
xargs -n1 -P10 -0 -d"\n" -Iuri bash -c "wget -O \"\$(echo \"uri\" | sed -e \"s/^.*&\///g\" -f ../urldecode.sed)\" \"uri\"" <../$1
)
@pirj
pirj / index.html
Created April 29, 2014 18:46
GNU/Linux и устройство на Rockchip 2918 / Хабрахабр
<!DOCTYPE html>
<!-- saved from url=(0032)http://habrahabr.ru/post/147793/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width = 1080">
<title>GNU/Linux и устройство на Rockchip 2918 / Хабрахабр</title>
@pirj
pirj / index.html
Created April 29, 2014 18:47
Восстанавливаем запоротый SSD / Хабрахабр
<!DOCTYPE html>
<!-- saved from url=(0032)http://habrahabr.ru/post/133915/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width = 1080">
<title>Восстанавливаем запоротый SSD / Хабрахабр</title>
@pirj
pirj / index.html
Created April 29, 2014 18:48
Интерфейсель: Запутанная история / Хабрахабр
<!DOCTYPE html>
<!-- saved from url=(0032)http://habrahabr.ru/post/145944/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width = 1080">
<title>Интерфейсель: Запутанная история / Хабрахабр</title>
@pirj
pirj / index.html
Created April 29, 2014 18:49
Неназойливые регистрация и вход на сайт / Хабрахабр
<!DOCTYPE html>
<!-- saved from url=(0032)http://habrahabr.ru/post/138538/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width = 1080">
<title>Неназойливые регистрация и вход на сайт / Хабрахабр</title>
@pirj
pirj / index.html
Created April 29, 2014 18:50
Необычные клавиатуры для программистов и не только / Хабрахабр
<!DOCTYPE html>
<!-- saved from url=(0032)http://habrahabr.ru/post/145084/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width = 1080">
<title>Необычные клавиатуры для программистов и не только / Хабрахабр</title>
@pirj
pirj / index.html
Created April 29, 2014 18:50
Пишем HTTP proxy сервер с плагинами / Хабрахабр
<!DOCTYPE html>
<!-- saved from url=(0032)http://habrahabr.ru/post/111569/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width = 1080">
<title>Пишем HTTP proxy сервер с плагинами / Хабрахабр</title>
@pirj
pirj / app.rb
Created October 24, 2014 07:58
Padrino::CanCan example that is known to have worked years ago
class App < Padrino::Application
register Padrino::Mailer
register Padrino::Helpers
register Padrino::Admin::AccessControl
register Padrino::Rendering
set :session_secret, "blah"
set :sessions, true
[403, 404, 405, 500].each do |code|
@pirj
pirj / Equation Greatest Common Divisior for a list of integers
Created May 3, 2009 19:00
Equation Greatest Common Divisior for a list of integers
#!/usr/bin/env ruby
module Algo
# Gets the Greatest Common Divisior of integers a and b
def self.gcd(a, b)
if b == 0
a.abs
else
gcd(b, a % b)
end
struct list_item {
list_item *next; // указатель на следующий элемент списка
list_item *rand; // указатель на произвольный элемент списка
};
list_item *first; // указатель на первый элемент списка
list_item copy(){
int length = 0;