Skip to content

Instantly share code, notes, and snippets.

View p182's full-sized avatar

p182

  • Донецьк, Україна
  • 01:31 (UTC +03:00)
View GitHub Profile
@atma
atma / plural_ru.php
Created May 16, 2011 04:03
Russian (ukrainian) plural form
<?php
/**
* @param int The number of items
* @param array Three item forms as for 1, 2-4(22,33), 5(66,78) respectively
*/
function plural_form($n, $forms)
{
$n = abs($n) % 100;
$n1 = $n % 10;
if ($n > 10 AND $n < 20) return $forms[2];
@dwendt
dwendt / soundcloud-scrobbler.js
Last active June 9, 2019 19:28
A fix for the soundcloud -> lastfm greasemonkey scrobbler. Updated to take advantage of soundcloud's pageless navigation.
// ==UserScript==
// @name SoundCloud Last.fm Scrobbler
// @namespace http://userscripts.org/users/266001
// @description SoundCloud Last.fm Scrobbler is a JS/Greasemonkey-based Last.fm scrobbler for SoundCloud with support for loving tracks. Based on Bandcamp Last.fm Scrobbler 0.9.4 GGS-0.9.3.
// @require http://userscripts-mirror.org/scripts/source/85398.user.js
// @include http://soundcloud.com/*
// @include https://soundcloud.com/*
// @version 0.1.6 GGS-0.9.5-Dv6
// @license FreeBSD License (see source code). Portions dual-licensed under the MIT (Expat) License and GPLv2.
// @grant GM_log
@adactio
adactio / micropub.php
Last active January 20, 2023 16:09
Minimal micropub endpoint.
<?php
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
# http://creativecommons.org/publicdomain/zero/1.0/
$mysite = 'https://adactio.com/'; // Change this to your website.
$token_endpoint = 'https://tokens.indieauth.com/token';
$_HEADERS = array();
foreach(getallheaders() as $name => $value) {
@ThenTech
ThenTech / SoundCloud_Downloader_Fix.user.js
Last active March 18, 2021 05:18
SoundCloud Download user script
// ==UserScript==
// @name SoundCloud Downloader Fix
// @namespace http://sc-downloader.com
// @author Usama Ejaz, Wosser1's Productions
// @description Adds a Download button to all the tracks on SoundCloud (works with the new SoundCloud interface)
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
// @include http://www.soundcloud.com/*
// @include http://soundcloud.com/*
// @include https://www.soundcloud.com/*
// @include https://soundcloud.com/*
@codedokode
codedokode / proxy.php
Created December 23, 2016 22:22
Простой прокси-сервер на PHP для изучения и модификации данных, передаваемых между браузером и сторонним сервером
<?php
/**
* Простой прокси-сервер на PHP для изучения и модификации данных,
* передаваемых между браузером и сторонним сервером.
*
* Запуск:
*
* указать URL сайта в $base
* php -S 127.0.0.1:9001 proxy.php
*
http://tegos.ru/
https://seclub.org/
http://m.mobtop.ru/catalogue/25
---
https://visavi.net/load/down?act=view&id=799 - вот эта сама старая похрду из доступных
https://visavi.net/load/down?act=view&id=1695 - и еще движок
https://visavi.net/load/down?act=view&id=1424 - а вот это новый самый на кохане
http://soft-2008.my1.ru/load/35-1-0-356 - 14 версия
@AgentOak
AgentOak / youtube_formats.md
Last active July 24, 2024 11:20
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@Mo45
Mo45 / discord.msg.send.php
Last active July 22, 2024 21:54
PHP - Send message to Discord via Webhook
<?php
//=======================================================================================================
// Create new webhook in your Discord channel settings and copy&paste URL
//=======================================================================================================
$webhookurl = "YOUR_WEBHOOK_URL";
//=======================================================================================================
// Compose message. You can use Markdown
// Message Formatting -- https://discordapp.com/developers/docs/reference#message-formatting
@cunneen
cunneen / Readme.md
Last active June 10, 2024 08:47
Install Open GApps In Android Emulator

Introduction

This works to install Open GApps into the Android Emulator, working around the issue where the system partition is too small.

With it, I can get Google Play installing into the emulator. Tested on KitKat (API 19), Lollipop (API 21) and Oreo (API 27).

It's tested on MacOS.

Instructions

@nzec
nzec / README.MD
Last active May 31, 2024 02:02
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb