Skip to content

Instantly share code, notes, and snippets.

View cab404's full-sized avatar
💜
s p a r k l i n g u n i c o r n p r i n c e s s ™

Cabia Rangris cab404

💜
s p a r k l i n g u n i c o r n p r i n c e s s ™
View GitHub Profile
@cab404
cab404 / fiction-reader.html
Created September 2, 2017 22:09
Opens FB2 books from src url parameter. Modified version of https://gist.github.com/Kup3a/1ae3b114b3f07ee35d37
<!DOCTYPE html>
<html manifest="fiction-reader.appcache">
<head>
<meta charset="utf-8">
<title>FictionReader JS</title>
<meta name="viewport" content="width=device-width">
<!--<link rel="shortcut icon" href="bookonscreen.png">-->
<!--<link rel="apple-touch-icon-precomposed" href="fiction-reader.png">-->
<script type="text/javascript" src="fiction-reader.js"></script>
<script type="text/javascript">
тип название ссылка стоимость
GPU GTX 1060 https://market.yandex.ru/product/14187640 21000
CPU AMD Ryzen 5 1600X https://market.yandex.ru/product/1723154074 13000
MBD ASRock Fatal1ty https://market.yandex.ru/product/1732965279 9500
RAM 2x8Gb Corsair Vengeance https://market.yandex.ru/product/13485858 12000
SSD Samsung EVO 860 https://market.yandex.ru/product/1969039551 6000
CSE Fractal Design Node 304 https://market.yandex.ru/product/8516133 5000
PSU Corsair VS450 450W https://market.yandex.ru/product/7951165 3000
RAD Noctua NH-L9x65 https://market.yandex.ru/product/12664665 3000
package com.cab404.testing
import io.socket.client.IO
import io.socket.client.Socket
import org.json.JSONObject
import java.io.FileWriter
import java.lang.Long
import java.text.SimpleDateFormat
import java.time.Instant
import java.util.*
@cab404
cab404 / Clusters.java
Created May 18, 2017 11:39
Simple greedy clustering algorithm supporting both directions of clustering
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* @author cab404
*/
public class Clusters<A> {
@cab404
cab404 / BlockingOverscrollView.java
Created March 29, 2017 14:42
Makes getting overscroll value from ListViews and other scrollables easy
package ru.mos.portal.android.design;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.nio.CharBuffer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

немного о включении режима мониторинга

короче

  1. сначала мы отключаем беспроводной интерфейс от менеджера системы (который думает, что мы очень хорошие, и хотим только свои пакеты) это мы делаем через
    	ifconfig <название интерфеса> down
package com.cab404.moblightlevel;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.common.MinecraftForge;
@cab404
cab404 / EAN13.java
Last active December 15, 2016 02:07
/**
* Generates EAN13 barcode data
*
* @author cab404
*/
public class EAN13 {
public static final int[] INDENTS = {0, 2, 44, 46, 92, 94};
public static final int LENGTH = 95;
private final static byte[][] CODEMAP =
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.widget.TextView;
/**
* Width resizing text view
*
* @author cab404
*/