Skip to content

Instantly share code, notes, and snippets.

View oleglr's full-sized avatar
:electron:
Working on the XYZ community project!

DEV_DE® oleglr

:electron:
Working on the XYZ community project!
View GitHub Profile
@oleglr
oleglr / flex.grub
Created February 11, 2024 15:16 — forked from DennisLfromGA/flex.grub
Script for ChromeOS Flex to add cros_debug / dev mode option in grub.cfg
### Script to add cros_debug / dev mode option in grub.cfg
### ( Each Flex update removes cros_debug / dev mode option
### Be sure to run this script AFTER each update and BEFORE rebooting )
ANS=
ROOTDEVICE=
ROOTDEVICEPREFIX=
P12MOUNTPOINT=/var/p12
GRUBCFGPATH=$P12MOUNTPOINT/efi/boot
GRUBCFGFILE=grub.cfg
@oleglr
oleglr / README.md
Created July 25, 2023 21:30 — forked from mbleigh/README.md
Firebase Hosting Fetch All Files

Fetch All Files from Firebase Hosting

This script fetches all of the files from the currently deployed version of a Firebase Hosting site. You must be signed in via the Firebase CLI and have "Site Viewer" permission on the site in question to be able to properly run the script.

Running via NPX

npx https://gist.github.com/mbleigh/9c8680cf319ace2f506f57380da66e7d <site_name>
@oleglr
oleglr / install_Jupyter.sh
Created March 14, 2023 11:05 — forked from gatopeich/install_Jupyter.sh
Install Jupyter iPython Notebook on Android via Termux
pkg upgrade
# Install runtime deps
pkg install python libzmq libcrypt
# Add build deps
pkg install python-dev libzmq-dev libcrypt-dev clang
pip3 install -U pip
pip3 install pyzmq --install-option="--zmq=/usr/lib"
pip3 install jupyter
@oleglr
oleglr / sendform-to-telegram.php
Created January 25, 2022 12:41 — forked from palnov/sendform-to-telegram.php
Отправка данных с форм в телеграм
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (!empty($_POST['name']) && !empty($_POST['phone'])){
if (isset($_POST['name'])) {
if (!empty($_POST['name'])){
$uname = strip_tags($_POST['name']);
$unameFieldset = "Имя:%20";
}
}
if (isset($_POST['phone'])) {
/*Вставляем в теле сайта*/
<body>
<a class="btn_telegram_share" href="https://telegram.me/share/url?url=ВАШ_URL&text=ТЕКСТ">Поделиться</a>
</body>
</html>
/*Вставляем CSS стиль*/
@oleglr
oleglr / auto-deploying.md
Created July 12, 2021 06:33 — forked from nickbclifford/auto-deploying.md
How to automatically deploy code to a server using Travis CI

Auto-Deploying via Travis CI

Because Travis CI can automatically execute scripts after successfully (or unsuccessfully!) executing tests, it is an obvious choice for a deployment tool. In order to deploy to a Git repository on a remote server, the process generally is as follows:

  • Set up SSH keys
  • Add the server's copy of the repository as a Git remote
  • Push to the remote
  • SSH into the server and execute any installation/compilation/miscellaneous commands

Before even touching .travis.yml...

Users

{
"synthwave84.brightness": 0.45,
"sync.gist": "1aeef16303cd9e23b21a1ec5b2279a91",
"todo-tree.general.tags": [
"BUG",
"HACK",
"FIXME",
"TODO",
"XXX",
"[ ]",
@oleglr
oleglr / index.html
Created June 2, 2021 11:56 — forked from techonomics69/index.html
particles.js
<!-- particles.js container -->
<div id="particles-js"></div>
<!-- stats - count particles -->
<div class="count-particles">
<span class="js-count-particles">--</span> particles
</div>
<!-- particles.js lib (JavaScript CodePen settings): https://github.com/VincentGarreau/particles.js -->
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;