Skip to content

Instantly share code, notes, and snippets.

View sash13's full-sized avatar

Aleksander Ryzhkov sash13

  • Kyiv, Ukraine
  • 02:46 (UTC +02:00)
View GitHub Profile
@sash13
sash13 / vk.js
Created December 31, 2012 20:25
var f = function () {
var d = new Date();
var nd = new Date(d.getTime() + (d.getTimezoneOffset() * 60000) + (3600000 * 4));
var e = new Date(new Date(2014, 1, 1, 0, 0, 0, 0).getTime() - nd.getTime());
var req = new XMLHttpRequest();
req.open("POST", "/al_page.php", true);
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("act=current_info&al=1&hash=your_info_hash&info=" + e.getHours() + "h " + e.getMinutes() + "m&oid=your_oid");
}
@sash13
sash13 / gifcreate
Last active December 11, 2015 01:29 — forked from rkfg/gifcreate
#!/bin/sh
help () {
echo "Usage: `basename $0` [-h] [-n] [-a] [-s hh:mm:ss] [-d ss] [-w px] [-f n] [-S n] [-b n] <filename> <result.gif>
-h show this help
-n turn off subtitles
-a don't open directory with frames in filemanager
-s start time in seconds or as hours:minutes:seconds, default: 0
-d duration in seconds or as hh:mm:ss, default: 5
Linux home 3.5.4-1-ARCH #1 SMP PREEMPT Sat Sep 15 08:12:04 CEST 2012 x86_64 GNU/Linux
pentium G850
7-Zip (A) [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=ru_RU.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
RAM size: 3683 MB, # CPU hardware threads: 2
RAM usage: 425 MB, # Benchmark threads: 2
Dict Compressing | Decompressing
[sasha@home ~]$ sudo stty -F /dev/ttyUSB0 -crtscts
[sasha@home ~]$ sudo cu -s 115200 -l /dev/ttyUSB0
Connected.
PowerPrep start initialize power...
e
booting...
PowerPrep start initialize power...
e
@sash13
sash13 / jigajiga.user.js
Created April 28, 2013 18:41
Simple Google Plus comments cleaner
// ==UserScript==
// @name hidePlusKomrads
// @description Script to hide comments
// @author Tsumugi Kotobuki
// @license MIT
// @version 0.01
// @include https://plus.google.com/*
// ==/UserScript==
(function (window, undefined) {
// ==UserScript==
// @name exBlogLoad
// @description Download image from exblog.jp
// @author Tsumugi Kotobuki
// @license MIT
// @version 0.01
// @include http://*.exblog.jp/*
// ==/UserScript==
(function (window, undefined) {
@sash13
sash13 / main.py
Created April 21, 2014 10:42
Yandex Locator python test
# Yandex Locator (http://api.yandex.ru/locator/)
# wifi position big bro
# api key from (http://api.yandex.ru/maps/form.xml)
# pok
import subprocess
import shlex
import webbrowser
import urllib
import urllib2
// used library
// https://github.com/milesburton/Arduino-Temperature-Control-Library
// https://github.com/jcw/ethercard
#include <OneWire.h>
#include <DallasTemperature.h>
#include <EtherCard.h>
/*
Repeating Web client
This sketch connects to a a web server and makes a request
using a Wiznet Ethernet shield. You can use the Arduino Ethernet shield, or
the Adafruit Ethernet shield, either one will work, as long as it's got
a Wiznet Ethernet module on board.
This example uses DNS, by assigning the Ethernet client with a MAC address,
IP address, and DNS address.
// ==UserScript==
// @name ruTracker magnet link
// @description Download directly without download torrent file
// @author Tsumugi Kotobuki
// @license MIT
// @version 0.02
// @include http://rutracker.org/*
// ==/UserScript==
(function (window, undefined) {