Skip to content

Instantly share code, notes, and snippets.

View StrixG's full-sized avatar

Nikita Obrekht StrixG

View GitHub Profile
class DeflateInterceptor : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
val response = chain.proceed(chain.request())
return inflate(response)
}
private fun inflate(response: Response): Response {
val body = response.body ?: return response
@StrixG
StrixG / Messages.yml
Created February 13, 2023 22:12
Russian translation for VentureChat plugin
Version: 2.22.4
BlockCommandPlayer: '&cВам запещено вводить команду {command}.'
BlockCommandSender: '&cИгроку &6{player} &cзапрещено выполнять команду {command}.'
BlockedCommand: '&cВам запещено вводить команду: {command}'
BlockingMessage: '&6{player} блокирует сообщения.'
BungeeToggleOff: '&6Вы теперь блокируете чат BungeeCord.'
BungeeToggleOn: '&6Вы теперь получаете сообщения из чата BungeeCord.'
ClearChatSender: '&aЧат сервера очищен.'
ClearChatServer: '&aВаш чат был очищен.'
ChannelCannotMute: '&cВы не можете заглушить игроков в этом канале: {channel_color}{channel_name}'
function getPluralString(count, pluralForms)
local lastDigit = count % 10
if count % 100 >= 11 and count % 100 <= 14 then
return pluralForms[1]
elseif lastDigit == 1 then
return pluralForms[2]
elseif lastDigit >= 2 and lastDigit <= 4 then
return pluralForms[3]
else
return pluralForms[1]
<acl>
<group name="Everyone">
<acl name="Default"></acl>
<object name="user.*"></object>
<object name="resource.*"></object>
</group>
<group name="Moderator">
<acl name="Moderator"></acl>
<object name="resource.mapcycler"></object>
<object name="resource.mapmanager"></object>
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
@StrixG
StrixG / rect.java
Created February 12, 2016 17:22
rect
@Override
protected void onDraw(Canvas canvas) {
canvas.drawColor(Color.BLACK);
Paint paint = new Paint();
paint.setStyle(Paint.Style.FILL);
for (int i = 1; i < 5; i ++) {
Log.d("MyView", "onDraw " + Integer.toString(i));
switch (i) {
case 1: {
@StrixG
StrixG / Main.java
Created October 18, 2015 20:19
Задача №65. Количество положительных элементов
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int[] array = new int[in.nextInt()];
for (int i = 0; i < array.length; i++) {
array[i] = in.nextInt();
}
@StrixG
StrixG / Main.java
Created October 18, 2015 20:18
Задача №64. Вывести четные элементы
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int[] array = new int[in.nextInt()];
for (int i = 0; i < array.length; i++) {
array[i] = in.nextInt();
}
for (int i = 0; i < array.length; i ++) {
if (array[i] % 2 == 0) {
@StrixG
StrixG / Main.java
Created October 18, 2015 20:16
Минимум 4 чисел
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println(min(in.nextInt(), in.nextInt(), in.nextInt(), in.nextInt()));
}
static int min(int a, int b, int c, int d) {
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int[] array = new int[in.nextInt()];
for (int i = 0; i < array.length; i++) {
array[i] = in.nextInt();
}