Skip to content

Instantly share code, notes, and snippets.

@CODeRUS
CODeRUS / scriptlets.spec
Created February 13, 2017 07:59
Scriptlets skeleton
%pre
case "$*" in
1)
echo Installing package
;;
2)
echo Upgrading package
;;
*) echo case "$*" not handled in pre
esac
02-19 12:35:27.617 1303 2308 I ActivityManager: Displayed com.android.soundrecorder/.SoundRecorder: +228ms
02-19 12:35:27.622 1303 2307 D BluetoothManagerService: Message: 400
02-19 12:35:30.526 1303 2307 D BluetoothManagerService: Message: 401
02-19 12:35:31.072 1303 3838 E QCOM PowerHAL: Failed to acquire lock.
02-19 12:35:31.197 1303 3937 D AudioService: Stream muted, skip playback
02-19 12:35:31.207 1303 7156 I MediaFocusControl: AudioFocus requestAudioFocus() from uid/pid 10065/11494 clientId=android.media.AudioManager@fe7a8abcom.android.soundrecorder.SoundRecorder
$3@a491b08 req=1 flags=0x0
02-19 12:35:31.210 7140 7164 D BluetoothLeScanner: onClientRegistered() - status=0 clientIf=4 mClientIf=0
02-19 12:35:31.218 7140 7164 W Binder : Binder call failed.
02-19 12:35:31.218 7140 7164 W Binder : java.lang.SecurityException: Need BLUETOOTH_PRIVILEGED permission: Neither user 10110 nor current process has android.permission.BLUETOOTH_PRIVILEGED
@CODeRUS
CODeRUS / VBoxManage
Created March 23, 2017 15:50
fake VBoxManage
#!/bin/bash
if [ "$1" == "list" -a "$2" == "runningvms" ]; then
echo "\"MerSDK\" {68d69402-8ec1-4813-9877-cd7c915913d1}"
else
/usr/bin/vboxmanage $@
fi
Sending build context to Docker daemon 4.096 kB
Step 1 : FROM alpine
---> 4a415e366388
Step 2 : COPY tools/* /
---> Using cache
---> 8a4543784d1a
Step 3 : RUN chmod +x /runmersdkengine.sh
---> Using cache
---> 182abfa1546f
Step 4 : EXPOSE 2222
@CODeRUS
CODeRUS / lostfilm-userscript.js
Last active July 18, 2017 15:47
Lostfilm unblock restricted content
// ==UserScript==
// @name Lostfilm restricted content unblock
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Userscript unblocking restricted content and make download buttons work again without changing ip address
// @author coderus
// @match http://www.lostfilm.tv/series/*
// @grant none
// ==/UserScript==
@CODeRUS
CODeRUS / script.js
Created July 31, 2017 11:36
dns-technopoint
// ==UserScript==
// @name DNS-SHOP to TECHNOPOINT
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.dns-shop.ru/product/*
// @grant none
// ==/UserScript==
@CODeRUS
CODeRUS / page.qml
Last active April 9, 2018 15:16
stupid page
import QtQuick 2.0
import Sailfish.Silica 1.0
// disables swipe back gesture but keeps page indicator back button functional
Page {
id: page2
function myPop() {
pageStack._pageStackIndicator._backPageIndicator().data[0].clicked.disconnect(myPop)
@CODeRUS
CODeRUS / wifi.json
Last active October 25, 2019 12:48
[
{
"ssid": "My access point 1",
"signalStrength": 60,
"security": "none"
},
{
"ssid": "My access point 2",
"signalStrength": 60,
"security": "WEP"
import QtQuick 2.5
import Sailfish.Silica 1.0
QtObject {
id: root
property var item: null
property var nextItem: null
property var previousItem: null
property var exitItem: null
@CODeRUS
CODeRUS / ambilight.cpp
Created March 26, 2020 12:21
arduino ambilight
/*
Управление лентой на WS2812 с компьютера + динамическая яркость
Создано не знаю кем, допилил и перевёл AlexGyver http://alexgyver.ru/
2017
*/
#include <Arduino.h>
//----------------------НАСТРОЙКИ-----------------------
#define NUM_LEDS 300 // число светодиодов в ленте
#define DI_PIN 13 // пин, к которому подключена лента
#define OFF_TIME 600 // время (секунд), через которое лента выключится при пропадаании сигнала