Skip to content

Instantly share code, notes, and snippets.

@yaojialyu
yaojialyu / visa.py
Created November 5, 2020 09:24
ais usvisa reschedule
# -*- coding: utf8 -*-
import time
import json
import random
import platform
from datetime import datetime
import requests
from selenium import webdriver
@gafda
gafda / update-scoop.ps1
Created March 12, 2024 13:42
Scoop Updater script for Powershell Core
# Scoop update & cleaner
scoop update
scoop update *
scoop cleanup *
scoop cache rm *
@K0rell
K0rell / media-sms-ovh.sh
Last active April 19, 2024 15:20
Zabbix SMS Alert with OVH SMS API
#!/bin/bash
# Requirement wget
# Create new script in nano /usr/lib/zabbix/alertscripts/media-sms-ovh.sh
# chmod +x media-sms-ovh.sh
# OVH SMS API
# Login into your ovh account create SMS user
ACCOUNT=MyOvhSmsAccountName(sms-xxxxxxxxx-x)
LOGIN=MyOvhSmsUserApiLogin
@mvidaldp
mvidaldp / sdcard_fix.md
Created April 11, 2022 12:43
SD card formating fix via ADB shell when Android GUI fails (internal, portable/external or mixed). Works on Retroid Pocket 2+

I wrote this short tutorial because extending my internal storage using my new micro SD card on my Retroid Pocket 2+ failed all the time. Only setting it up as portable/external worked. However, this instructions should work in any Android 5.0+ device.

So, in case you have problems setting up your SD card on your Android device via graphical interface (setting up storage as extended internal memory or portable), and you get a corrupted SD card or any other error, follow these steps to fix it via adb shell:

  1. Make sure you have adb access to your Android device: Settings > System > About, touch/click on Build number until Developer options are enabled:
  2. Go to Settings > System > Developer options and enable USB debugging.
  3. Assuming you have adb installed on your remote terminal run the following:

adb shell

#!python
def savitzky_golay(y, window_size, order, deriv=0, rate=1):
r"""Smooth (and optionally differentiate) data with a Savitzky-Golay filter.
The Savitzky-Golay filter removes high frequency noise from data.
It has the advantage of preserving the original shape and
features of the signal better than other types of filtering
approaches, such as moving averages techniques.
Parameters
----------
y : array_like, shape (N,)
@scriptdev
scriptdev / .php
Created June 25, 2021 15:56
CRIAR SEQUENCIAL NA COLUNA DO DATAGRID
<?php
/*
1 - CRIE UMA COLUNA NO DATAGRID PARA POR O SEQUENCIAL
2 - CRIE UMA NOVA TRANSFORMAÇÃO E COLOQUE O CÓDIGO ABAIXO:
*/
static $sequencial;
$sequencial++;
if(isset($_GET['offset']) and $sequencial < $_GET['offset'])
@sousagarcia
sousagarcia / .php
Created June 29, 2021 12:38 — forked from scriptdev/.php
VALIDAR SE OS ITENS DO MESTRE DETALHE TEM DADOS ANTES DE SALVAR
<?php
if(!isset($param['datagrid_itens__row_data']))
{
new TMessage('error', 'ADICIONE UM ITEM!');
return;
}
@fishchev
fishchev / index.html
Last active April 19, 2024 15:14
Minimal page structure/sample to trigger Telegram's IV template for https://teletype.in.
<!DOCTYPE html>
<head>
<title>$title</title>
<meta property="og:site_name" content="$site_name">
<meta property="og:description" content="$description">
<meta property="article:author" content="$author">
<!-- $image_url / link preview image is set using og:image property -->
<!-- <meta property="og:image" content="http://example.com/img.jpeg"> -->
<meta property="telegram:channel" content="@cor_bee">
@hekmon
hekmon / README.md
Last active April 19, 2024 15:13
EDF Tarif Bleu prices within Home Assistant

Simply include the file within your configuration.yaml file like this:

# ...
input_number: !include input_numbers.yaml
# ...

Restart your Home Assistant to update the values (reloading YAML will not be enough).

@davispuh
davispuh / steam_console_params.txt
Last active April 19, 2024 15:13
Steam client parameters, consoles commands and variables
-480p - Run tenfoot in 480p rather than 1080p
-720p - Run tenfoot in 720p rather than 1080p
-accesscode -
-all_languages - show longest loc string from any language
-batterytestmode - rapidly cycle battery percentages for testing
-bigpicture - Start in Steam Big Picture mode
-blefw -
-cafeapplaunch - Launch apps in a cyber cafe context
-candidates - Show libjingle candidates for local connection as they are processed
-ccsyntax - Spew details about the localized strings we load