Skip to content

Instantly share code, notes, and snippets.

Semen Martynov SemenMartynov

Block or report user

Report or block SemenMartynov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SemenMartynov
SemenMartynov / Apache Kafka on Ubuntu.txt
Last active Sep 5, 2018
kafka installation on ubuntu 16.04
View Apache Kafka on Ubuntu.txt
Install and configure Apache Kafka on Ubuntu 16.04
1. Install Java (JDK8)::
Add the repository
$ sudo add-apt-repository -y ppa:webupd8team/java
Update the metadata of the new repository and install JDK
View range
generator(start, stop):
index = start
while index < stop:
yield index
index += 1
range(start, stop):
mylist = []
for i in generator(start, stop):
mylist.append(i)
View gist:71945b01dc4b2418a10e
// Alexander Kuznetsov
#include <string>
#include <utility>
#include <stdio.h>
#include <stddef.h>
using namespace std;
typedef pair<string, int> Obj;
View gist:b73785ae4dbf8f8fa34e
// Evgeny Golovachyov
#include <string>
#include <utility>
typedef std::pair<std::string, int> Obj;
int main() {
using namespace std;
Obj object("Ololo", 1234);
@SemenMartynov
SemenMartynov / Tweetily's log
Created Aug 6, 2013
Tweetily must automatically promote posts or pages from WordPress on Twitter.
View Tweetily's log
1375632022 In function get_request_tokenThe last tweet in : August 4, 2013, 4:00 pm
1375632022 ..params are Array
(
[oauth_consumer_key] => x1f7w1y3gu8WFMgWramMQ
[oauth_callback] => https://cloudtips.org/wp-admin/admin.php?page=Tweetily&amp;TOP_oauth=1
[oauth_signature_method] => HMAC-SHA1
[oauth_timestamp] => 1375632022
[oauth_nonce] => cd326ee12019b4beb349b9b47cd6b25c
[oauth_version] => 1.0
)
View vk xml response
<?xml version="1.0" encoding="utf-8"?>
<response list="true">
<count>38698</count>
<audio>
<aid>75774002</aid>
<owner_id>12186866</owner_id>
<artist>AC/DC</artist>
<title>Highway To Hell </title>
<duration>208</duration>
<url>http://cs4496.vk.me/u32436943/audios/855004beef40.mp3</url>
View Scale immage
class ImagePanel extends JPanel {
private static final long serialVersionUID = 1L;
private Image img;
public ImagePanel(Image img) {
this.img = img;
}
public void paintComponent(Graphics g) {
int min = Math.min(getWidth(), getHeight());
You can’t perform that action at this time.