Skip to content

Instantly share code, notes, and snippets.

@lidgnulinux
lidgnulinux / get_cursor_coordinate_wayland.sh
Created February 5, 2024 02:32
How to get cursor's coordinate on wayland.
#!/bin/bash
# Dependencies :
# - slurp (https://wayland.emersion.fr/slurp/).
# - awk.
# - cut.
# - sed.
# - Wayland compositor with layer_shell support.
# How to use :
@FedericoTartarini
FedericoTartarini / main.tex
Created June 14, 2022 15:23
How to use the siunitx LaTeX package
\documentclass[12pt]{article}
\usepackage{booktabs}
\usepackage{siunitx}
\sisetup{locale = DE, per-mode = symbol, range-phrase=--, range-units=single, product-units=single}
\begin{document}
\section*{siunitx package}
@chrislavender
chrislavender / gist:cad26500c9655627544f
Last active April 19, 2024 15:28
HTTP Live Streaming Tutorial

Note: This is an older post that I did back when I thought I might have time to be a blogger. Oh I was oh so wrong. However, it has proven useful for some folks on stackoverflow. Thus I'm keeping it alive here on Gist.

One of my past projects dealt heavily with an open source Apple technology called HTTP Live Streaming. It’s an HTTP based streaming protocol that at its most fundamental level provides a way to stream video and audio from just about any server with nothing but a few free software tools provided by Apple**. However, it has a few additional features that I think make it a really exciting tool. Yet, I haven’t seen HTTP Live Streaming used very much. This is probably mainly due to the combination of a lack of good/clear documentation, and Apple’s Live Streaming Developer Tools being command line based also make the barrier to entry higher than many developers want to deal with.

The hope is to share my understanding of how to use this technology to:

@denizssch
denizssch / XpSerials.txt
Created July 21, 2019 00:13
Windows XP ALL Serial Keys :) (For testing purpose [Ex: VM or PenTest])
FCKGW-RHQQ2-YXRKT-8TG6W-2B7Q8
Windows XP PRO Corporate serial number S/N: Key: MQPWW-PGVKX-YPMKG-8DH3G-KC8PW
windows xp home edition serial number S/N: 034634-262024-171505-828316-729010-413531-800424-400442
Windows XP 64 serial number S/N: B2RBK-7KPT9-4JP6X-QQFWM-PJD6G
Windows XP serial number S/N: K6C2K-KY62K-DQR84-RD4QV-QB74Q
Windows XP Professional 64-bit Corporate Edition 5.2.3790.1830 serial number S/N: VCFQD-V9FX9-46WVH-K3CD4-4J3JM
Microsoft Windows XP Professional SP2 serial number S/N: YY8F2-3CKVQ-RKTRG-6JMDR-9DTG6
Windows XP Professional Service Pack 1 sp1 serial number S/N: F46YY - 2R8VQ - R8GMY - 926VK - 6BQ73
Windows XP Pro serial number S/N: KBWR7-76BD8-J7MDQ-KKG&C-V9Q2J
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active April 19, 2024 15:27
Files for PlayStation BIOS Files NA-EU-JP
@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,)