Skip to content

Instantly share code, notes, and snippets.

@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"
@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 / 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 / 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==
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 / 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
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 / 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
@CODeRUS
CODeRUS / hueShift.js
Last active November 29, 2016 19:15
QML hueShift
function rgbToHsv(r, g, b) {
r = r/255, g = g/255, b = b/255;
var max = Math.max(r, g, b), min = Math.min(r, g, b);
var h, s, v = max;
var d = max - min;
s = max == 0 ? 0 : d / max;
if (max == min) {
h = 0; // achromatic
@CODeRUS
CODeRUS / journalcat.py
Last active November 25, 2016 08:28
JournalCat
#!/usr/bin/env python3
'''
Copyright 2016, Andrey Kozhevnikov coderusinbox@gmail.com
'''
# journalcat
# Script to highlight journalctl output for console
# With respect to Android AOSP project pidcat script