Skip to content

Instantly share code, notes, and snippets.

View ittp's full-sized avatar

tp ittp

  • Saint-Petersburg
View GitHub Profile
@ittp
ittp / direct-session.mermaid
Last active September 1, 2023 07:23 — forked from martinpitt/direct-session.mermaid
consoledot PoC structure
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ittp
ittp / PanelHeaderWithFullScreen.js
Created August 7, 2023 21:39 — forked from FlyInk13/PanelHeaderWithFullScreen.js
VK App web fullscreen button
import React from 'react';
import { PanelHeader, HeaderButton } from '@vkontakte/vkui';
import Icon24Fullscreen from '@vkontakte/icons/dist/24/fullscreen';
import Icon24FullscreenExit from '@vkontakte/icons/dist/24/fullscreen_exit';
class PanelHeaderInternal extends PanelHeader {
get webviewType () {
return window.isWeb ? 'internal' : 'vkapps';
}
@ittp
ittp / keyevents.json
Last active July 1, 2023 09:31 — forked from arjunv/keyevents.json
All Android Key Events for usage with adb shell
{
"key_events": {
"key_unknown": "adb shell input keyevent 0",
"key_soft_left": "adb shell input keyevent 1",
"key_soft_right": "adb shell input keyevent 2",
"key_home": "adb shell input keyevent 3",
"key_back": "adb shell input keyevent 4",
"key_call": "adb shell input keyevent 5",
"key_endcall": "adb shell input keyevent 6",
"key_0": "adb shell input keyevent 7",
@ittp
ittp / google_script.js
Created May 29, 2023 21:32 — forked from shibulijack-fd/google_script.js
Google script to convert spreadsheet to YML
function getYAML() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var dest = DocumentApp.openById(PropertiesService.getScriptProperties().getProperty("output_document_id"));
var key = Browser.inputBox("Please enter the key of the Google Spreadsheet containing the content to be generated as a YAML file.");
var source = SpreadsheetApp.openById(key);
var output = "---\nen:\n";
var sheets = source.getSheets();
for (var i = 0; i < sheets.length; i++) {
@ittp
ittp / bt pair
Created May 28, 2023 01:07 — forked from agapovmax/bt pair
echo -e "${ylw}Спарить PS3 Bluetooth remote\n(y|n)?${rst}"
read btr
case "$btr" in
y) cd $PS3DIR
tar xvfz ps3pair.tar.gz
cd ps3pair
echo "${grn}Спариваем устройства...${rst}"
sudo python ps3_pair.py
#sudo bluez-test-input connect 00:24:33:A0:43:18
sudo /usr/share/doc/bluez/examples/list-devices | grep Connected
@ittp
ittp / ssh-forward-start.sh
Created May 2, 2023 17:18 — forked from ericwastaken/ssh-forward-start.sh
Shell script to start up an SSH Port Forward to a remote
#!/bin/bash
# *********************************************************************
# script: ssh-forward-start.sh
# summary: Starts an SSH Port Forward process, forwarding a localhost
# port to a remote host. The PID of the SSH process will be saved to
# the file defined in the pid_filename variable.
# See the companion script ssh-forward-stop.sh, which stops the tunnel
# using the process information in the PID file.
#
@ittp
ittp / glpi.sh
Created May 2, 2023 12:45 — forked from Noobzik/glpi.sh
#!/bin/sh
if ! [ $(id -u) = 0 ]; then
echo "I am not root!"
exit 1
fi
echo "Checking for lamp"
if ! [ $(dpkg-query -W -f='${Status}' apache2 2>/dev/null | grep -c "ok installed") -eq 0 ];