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">
package ru.todaydelivery.android
import android.bluetooth.BluetoothAdapter
import android.bluetooth.BluetoothDevice
import android.bluetooth.BluetoothSocket
import ru.todaydelivery.android.Printer3CottBT.PRINTER_UUID
import java.io.Closeable
import java.io.OutputStream
import java.nio.charset.Charset
import java.util.*
@cab404
cab404 / bandcamp-dl.sh
Last active January 2, 2018 16:26
bandcamp album download script
#!/bin/bash
# Made by cab404
# Licenced under GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html)
# Musicians need food too, please pay for everything you download. Or at least something.
echo 'loading info'
wget $1 -qO- | grep 'trackinfo' > data.txt
OUTDIR=$(echo $1 | sed 's/\//\n/g' | sed '/^$/d' | tail -n 1)
mkdir $OUTDIR
@cab404
cab404 / cache
Created February 1, 2018 16:23
caching script for drone.io Volume Cache
#!/bin/bash
# drone.io cache simplifier by cab404, for using with Volume Cache plugin
# allows you to cache practically anything from anywhere, specifying only '.drone-cache' in mounts
# to pack something do "cache in (smthn)"
# to unpack all do "cache out"
#
# e.g you want to cache /root/.gradle/cache and /root/.gradle/wrapper (typical for android), you do
# get-cache:
# image: drillster/drone-volume-cache
# restore: true
#!/bin/bash
id=$(xinput list --id-only "SynPS/2 Synaptics TouchPad")
is_on=$(xinput list-props $id | grep "Device Enabled" | tail -c 2 | grep 1)
echo $is_on
if (( $is_on ))
then
state=0;
diff --git a/dellfan.c b/dellfan.c
index 5f9098d..1f71236 100644
--- a/dellfan.c
+++ b/dellfan.c
@@ -67,10 +67,10 @@
* putting the speed to maximum, sleeping some seconds, and checking the speed back.
* Check the function probecodes()
*/
-#define DISABLE_BIOS_METHOD1 0x30a3
-#define ENABLE_BIOS_METHOD1 0x31a3
тип название ссылка стоимость
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
@cab404
cab404 / 9patch-resize.sh
Last active March 29, 2018 20:33
Resizer for 9patch images based on im utils
#!/bin/bash
# resizer for android 9patch icons
# getting center part
convert -shave 1 $1 core.png
# getting sides
convert -gravity West -crop 1x+0+0 $1 l.png
convert -gravity East -crop 1x+0+0 $1 r.png
convert -gravity South -crop x1+0+0 $1 b.png
@cab404
cab404 / checkmacs.sh
Last active April 3, 2018 07:05
MAC address checker for moscow metro
#!/bin/bash
# script for finding userdata from a list of macs.
# for educational purposes only, of course.
INPUT=$1
SSID=MT_FREE
DEV=${2:-wlp1s0}
OUTDIR=check-`date +%d-%m-%yT%H:%M:%S`
function jsonf() { python -c 'import json; json.dump(json.load(open("/dev/stdin", "r")), open("/dev/stdout", "w"), indent=2)'; echo; }

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

короче

  1. сначала мы отключаем беспроводной интерфейс от менеджера системы (который думает, что мы очень хорошие, и хотим только свои пакеты) это мы делаем через
    	ifconfig <название интерфеса> down