Skip to content

Instantly share code, notes, and snippets.

View DimaKoz's full-sized avatar
:octocat:
What's happening?

Dmitrii Kozhevin DimaKoz

:octocat:
What's happening?
  • Rossiya Segodnya
  • Moscow, USSR
View GitHub Profile
@DimaKoz
DimaKoz / go-executable-build.sh
Last active January 29, 2024 07:02
The Script to Automate Cross-Compilation for Golang(OSX)
#Before we can use the script, we have to make it executable with the chmod command:
#chmod +x ./go-executable-build.sh
#then we can use it ./go-executable-build.sh yourpackage
#!/usr/bin/env bash
package=$1
if [[ -z "$package" ]]; then
echo "usage: $0 <package-name>"
exit 1
fi
@DimaKoz
DimaKoz / Markdown-docs.md
Created January 17, 2024 08:20 — forked from Jekins/Markdown-docs.md
Руководство по оформлению Markdown файлов

Руководство по оформлению Markdown файлов

Markdown - это облегчённый язык разметки, который преобразует текст в структурированный HTML. Следующее руководство поможет вам разобраться, как использовать Markdown.

Заголовки

# Заголовок первого уровня
## Заголовок второго уровня
### Заголовок третьего уровня
#### Заголовок четвёртого уровня
##### Заголовок пятого уровня
package gziphandler
import (
"compress/gzip"
"log"
"net/http"
"strings"
"sync"
)
@DimaKoz
DimaKoz / goQueryTest.go
Created December 16, 2019 17:30 — forked from salmoni/goQueryTest.go
Parsing HTML in Go/Golang using goQuery to extract data from only one of multiple tables. Demonstrates nested Find statements.
package main
import (
"fmt"
"log"
"strings"
"github.com/PuerkitoBio/goquery"
)
private float calculateArcSize(float animationProgress) {
final double adjustedProgress = Math.sin(animationProgress * Math.PI);
// ARC_MAX_DEGREES is the maximum size the arc will have in degrees.
// ARC_MAX_DEGREES = 180 means that at it's largest it will cover
// half the circle.
return (float) adjustedProgress * -ARC_MAX_DEGREES;
}
private float calculateArcStart(float animationProgress) {
final float deceleratedProgress = mDecelerateInterpolator.getInterpolation(animationProgress);
@DimaKoz
DimaKoz / README.md
Created June 22, 2018 20:20 — forked from arturokunder/README.md
Verify APK signature

Do I have the correct certificate to sign my APK?

Use keytool Keytool is part of Java, so make sure your PATH has Java installation dir in it.

Get APK Certificate Signature

First, unzip the APK and extract the file /META-INF/ANDROID_.RSA (this file may also be CERT.RSA or something.RSA, but there should only be one .RSA file).

Then, run:

@DimaKoz
DimaKoz / MainActivity.java
Created March 27, 2016 21:26 — forked from blackcj/MainActivity.java
Design support library with CoordinatorLayout, SwipeRefreshLayout and RecyclerView.
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.TabLayout;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import com.blackcj.designsupportexample.adapters.RecyclerViewAdapter;