Skip to content

Instantly share code, notes, and snippets.

View Radiokot's full-sized avatar
🐍

Oleg Koretsky Radiokot

🐍
View GitHub Profile
@obfusk
obfusk / README.md
Last active June 10, 2024 20:59
baseline.profm not deterministic
@straker
straker / README.md
Last active July 1, 2024 19:17
Basic Missile Command HTML and JavaScript Game

Basic Missile Command HTML and JavaScript Game

This is a basic implementation of the Atari Missile Command game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score
  • When a missile explodes (not a counter-missile), the score should increase by 25
@joewalnes
joewalnes / jar-launcher.md
Last active December 10, 2023 11:58
Make a single file Java jar launcher

This is a little trick to turn an executable Java jar.

It works on all unixy like systems including Linux, MacOS, Cygwin, and Windows Linux subsystem.

Step 1 Start with an all-in-one jar (with entry point and all deps within)

$ ls 
hello.jar
@jalcantarab
jalcantarab / _jsonPuller.md
Last active June 3, 2024 10:49 — forked from crstamps2/jsonPuller
A Google apps script to pull json from a spreadsheet

JSON Puller - Google Apps Script

Transforms the data of a given Spreadsheet Sheet to JSON.

  • The frozen rows are taken as keys for the JSON.
  • The data taken for the values is only that after the frozen rows

Set up:

exportJSON(Spreadsheet) - transforms the data in the given sheet to JSON.

@vuklip
vuklip / markdown.md
Last active September 21, 2023 20:44
markdown extention
инструкция что делает
<sub>text</sub> подстрочный текст
<sup>text</sup> надстрочный текст
<ins>text</ins> подчеркнутый текст
&nbsp; отступ. втыкать столько роз сколько необходимо
<sup id="a1">[1](#f1)</sup> сноска
<b id="f1">1</b> Footnote. [↩](#a1) куда ссылается
@hungps
hungps / okhttp3.WebviewCookieHandler.java
Last active January 6, 2024 11:39
Cookie jar that handles syncing okhttp cookies with Webview cookie manager
import android.webkit.CookieManager;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import okhttp3.Cookie;
import okhttp3.CookieJar;
import okhttp3.HttpUrl;
@codezjx
codezjx / CircleImageTransformation.java
Last active July 28, 2023 12:15
A picasso circle image transformation. Optimized version of: https://gist.github.com/julianshen/5829333. Use shader.setLocalMatrix() method to draw circle bitmap not from source bitmap left-top. So, we no need to create square bitmap!
/**
* Created by codezjx on 2016/5/4.
*/
public class CircleImageTransformation implements Transformation {
/**
* A unique key for the transformation, used for caching purposes.
*/
private static final String KEY = "circleImageTransformation";
@joepie91
joepie91 / vpn.md
Last active July 8, 2024 07:49
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@Folyd
Folyd / WrapGridView.java
Last active January 31, 2024 20:54
A custom GridView which can wrap content.
import android.content.Context;
import android.util.AttributeSet;
import android.widget.GridView;
/**
* A custom GridView which can wrap content.
*/
public class WrapGridView extends GridView {
public WrapGridView(Context context) {
@cbeyls
cbeyls / ContentLoadingProgressBar.java
Last active December 20, 2021 22:16
ContentLoadingProgressBar implemented The Right Way™
package be.digitalia.common.widgets;
import android.content.Context;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ProgressBar;
/**
* ContentLoadingProgressBar implements a ProgressBar that waits a minimum time to be