Skip to content

Instantly share code, notes, and snippets.

View rapthead's full-sized avatar

Павел Грибанов rapthead

  • Russia, Chelabinsk
View GitHub Profile
echo -E '{\n "level": 10,\n "time": 1559133337338,\n "msg": "query start",\n "pid": 60,\n "hostname": "e578da35f5aa",\n "name": "ppldo",\n "connectionId": "24c2bf7c-f17d-47ad-ab44-c2d489b92439",\n "currentUserId": "c2b9e4cb-0275-40e6-98f4-34ca836015cd",\n "transport": null,\n "graphqlOperationName": "loadInactiveIssues",\n "graphqlQuery": "query loadInactiveIssues {\n data: issues(filter: {active: false}) {\n edges {\n node {\n ...Issue\n ...IssueFullInfo\n }\n }\n }\n}\n\nfragment Issue on Issue {\n id\n start_date\n end_date\n executor_id: executor {\n id\n }\n chat_id: chat {\n id\n }\n}\n\nfragment IssueFullInfo on Issue {\n full_chat: chat {\n ...Chat\n ...ChatMessages\n }\n}\n\nfragment Chat on IChat {\n id\n __typename\n notification\n notification_disabled_till\n created_at\n unread_count: unread_messages_count\n attached_files {\n edges {\n node {\n ...File\n }\n }\n }\n users_ids: us
// ==UserScript==
// @name rutracker.net no-mirror
// @namespace http://rutracker.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://rutracker.net/*
// @grant none
// ==/UserScript==
@rapthead
rapthead / get_photos.pl
Created August 10, 2015 19:24
вытягивает изображения исполнителей с last.fm
#!/usr/bin/perl -w
use LWP::Simple;
my $band=$ARGV[0];
my $directory=$ARGV[1];
$band =~ tr/ /+/;
my $content = get('http://www.lastfm.ru/music/'.$band);
my ( $first_image ) = $content =~
@rapthead
rapthead / get_comix.pl
Created August 10, 2015 19:23
вытягивает комиксы с bash.im
#!/usr/bin/perl -w
use LWP::Simple;
my $directory = shift;
my $nextURL = 'http://bash.org.ru/comics';
do {
$content = get($nextURL);
print "\n",$nextURL,"\n";
#print $content;
$content =~ '<td class="navi"><a href="([^"]+)">&larr;</a>';
@rapthead
rapthead / import-photos.sh
Created August 10, 2015 18:39
import photos and name them by date in exif info
#!/bin/sh
ARCHIVE=$HOME/photos
for f in "$@"; do
DT=$(exiftool -s -DateTimeOriginal "$f")
DIR=$(echo $DT|awk '{print $3;}'|sed 's/:/\//g')
TARGET="$ARCHIVE/$DIR"
install -d "$TARGET" && \
install "$f" "$TARGET"
@rapthead
rapthead / photo.sh
Created August 10, 2015 18:35
create wallpaper with polaroid-like photo in corner
#!/bin/bash
source="/home/noname/PICTURES/Photos/2009/"
lc=`ls $source | wc -l`
source=$source/`ls $source | sed -n "$(($RANDOM%$lc+1))p"`
photo="/home/noname/.photo.png"
cp "$source" "$photo"
picture_aspect=$(($(identify -format %w "$photo") - $(identify -format %h "$photo")))