Skip to content

Instantly share code, notes, and snippets.

View mairbek's full-sized avatar
🎩
¯\_(ツ)_/¯

Mairbek Khadikov mairbek

🎩
¯\_(ツ)_/¯
View GitHub Profile
@mairbek
mairbek / Media.md
Created March 25, 2021 15:34
Media Rus

Простые правила употребления медиа:

  • Найдите время, чтобы разобраться в технических деталях. Компании, работающие с социальными сетями, могут измерить реакцию аудитории на что угодно. Подумайте, как бы вы его построили свою стратегию.
  • Избегайте алгоритмических лент новостей. Используйте что-нибудь вроде Feedbin.
  • Потребляйте только тот контент, за который вы бы заплатили.
  • Особо помогает журналирование. Обратите внимание, как быстро вы перестаете заботиться о вещах, которые раньше поглощали вас.
@mairbek
mairbek / Media.md
Last active March 25, 2021 15:28
Media Rules

Simple rules for consuming media:

  • Take some time to understand the technical details. Social media companies have the ability to measure the audience reaction to anything. Think how would you build it, they are likely doing better than that.
  • Avoid algorithmic newsfeeds. Use something like Feedbin.
  • Only consume content that you’d pay for.
  • Some kind of a journaling route helps. Notice how quickly you stop caring about stuff that consumed you before.

COVID-19

June

What we know?

  • Serious clinical outcomes are strongly correlated with age and accompanying illnesses;
  • Most of the spread happens indoor and requires 15min+ contant;
  • Younger people tend to be asymptomatic and spread;
  • Masks work. The work better if everyone wears them;
package org.apache.beam.sdk.io.gcp.spanner;
import com.google.auto.value.AutoValue;
import com.google.cloud.spanner.Statement;
import com.google.cloud.spanner.Struct;
import java.io.Serializable;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
import org.apache.beam.sdk.transforms.Create;
import org.apache.beam.sdk.transforms.DoFn;
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-common-protos</artifactId>
<version>0.1.9</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-google-cloud-platform</artifactId>
<version>${beam.version}</version>
<exclusions>

Keybase proof

I hereby claim:

  • I am mairbek on github.
  • I am mairbek (https://keybase.io/mairbek) on keybase.
  • I have a public key whose fingerprint is 7693 002C AAE9 54B4 5679 A760 AE51 F649 EDFA 384F

To claim this, I am signing this object:

@mairbek
mairbek / bashtips.md
Last active December 30, 2015 09:09
Bash tips

Ctrl + A Go to the beginning of the line you are currently typing on

Ctrl + E Go to the end of the line you are currently typing on

Ctrl + L Clears the Screen, similar to the clear command

Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.

Ctrl + H Same as backspace

@mairbek
mairbek / logging.java
Created January 21, 2012 14:52
Logging2
if (log.isDebugEnabled()) {
log.debug("Processing request" + request);
}
@mairbek
mairbek / logging.java
Created January 21, 2012 14:50
Logging
log.error("SOMETHING REALLY BAD HAPPENED")
log.warn("Something bad happened")
log.info("Startup")
log.debug("Processing request" + request)
@mairbek
mairbek / gist:1584324
Created January 9, 2012 18:51
DoubleVsBigDecimalBenchmark
public class DoubleVsBigDecimalBenchmark extends SimpleBenchmark {
@Param({"1", "1.01", "1.0123456789", "20", "20.01", "20.0123456789", "1000000000", "1000000000.01", "1000000000.0123456789"})
private double value;
private BigDecimal[] bigDecimalVal = new BigDecimal[1];
private double[] doubleVal = new double[1];
@Override
protected void setUp() throws Exception {
bigDecimalVal[0] = BigDecimal.valueOf(value);