Skip to content

Instantly share code, notes, and snippets.

View Ardagan's full-sized avatar

Mikhail Gryzykhin Ardagan

View GitHub Profile
@Ardagan
Ardagan / launch.json
Created June 22, 2024 23:37
VSCode Godot Config
{
"version": "0.2.0",
"env": {
"godot_path": "Godot_v4.2.2-stable_mono_win64.exe"
},
"configurations": [
{
"name": "Launch",
"type": "coreclr",
"request": "launch",
@Ardagan
Ardagan / puzzle.cs
Created January 7, 2022 04:19
Torches puzzle
void Main()
{
int size = 6;
CheckBox[,] buttons = new CheckBox[size,size];
Form myform = new Form();
var layout = new TableLayoutPanel();
myform.Controls.Add(layout);
layout.AutoSize = true;
@Ardagan
Ardagan / dump_meta.txt
Created December 21, 2020 21:18
Parse cassandra dump for test temporal metrics
kubectl run --image=cassandra:3.11 --restart=Never --rm=true -it containername -- /bin/bash
----------------------------------
/# cat /root/.cassandra/cqlshrc
[authentication]
username = <un>
password = <pwd>
[cql]
@Ardagan
Ardagan / mass_comment.py
Last active April 14, 2020 18:30
Send multiple comments to github PR.
#
# Set GH_ACCESS_TOKEN
# Update PullRequest(number:
# Update subjectId
#
import itertools
import os
import socket
import sys
@Ardagan
Ardagan / LinuxTricks.sh
Created July 24, 2019 20:36
Linux tricks
# Upgrade distributive and fix in case of failure.
# Run dist-upgrade from terminal, not from X system.
apt-get dist-upgrade
# Load from recovery, mount rootdevie as root.
apt-get --fix-broken install
# Restart, try dist-upgrade another time
# configure apt-get repos
vim /etc/apt/sources.list
@Ardagan
Ardagan / commands.sh
Last active March 26, 2019 23:49
Beam run java worker pipeline
# build all binaries skipping docker images and running tests
./gradlew build -x rat -x javadoc -x test -x website -x docs -x sdist -x lintPy27 -x lintPy27_3 -x lintPy3 -x testWebsite -x spotlessJava -x goTest -x checkstyleMain -x buildDockerImage -x spotbugsMain -x checkstyleTest -x buildLocalWebsite -x goVet -x gofmt
# skip compiling java tests
-x compileTestJava -x shadowJar -x compileJava
# Build java worker jav (DF runner harness)
./gradlew :beam-runners-google-cloud-dataflow-java-fn-api-worker:build -x spotlessJava -x rat -x test
./gradlew :beam-runners-google-cloud-dataflow-java-fn-api-worker:shadowJar
@Ardagan
Ardagan / .vimrc_suffix
Created October 11, 2018 20:01
.vimrc_suffix
set autoindent
set tabstop=2
set expandtab
set listchars=tab:»-,space:·,nbsp:␣,trail:•,precedes:«,extends:»
set list
@Ardagan
Ardagan / GetStacktrace.java
Created October 11, 2018 20:00
JavaGetStacktrace
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(MultimapSideInput.class);
LOG.error("Some text here, stacktrace: {}", getStackTrace());
private String getStackTrace() {
StackTraceElement[] trace = Thread.currentThread().getStackTrace();
StringBuilder traceInfo = new StringBuilder();
for (StackTraceElement stackItem : trace) {
@Ardagan
Ardagan / .gitconfig
Last active June 27, 2024 20:43
.gitconfig
[remote "origin"]
url = [email protected]:Ardagan/beam.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "upstream"]
url = [email protected]:apache/beam.git
fetch = +refs/heads/master:refs/remotes/upstream/master
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
fetch = +refs/pull/*/merge:refs/remotes/upstream/pull/*