Skip to content

Instantly share code, notes, and snippets.

View ForumPlayer's full-sized avatar
💥
Segmentation fault (Core dumped)

Igor M. ForumPlayer

💥
Segmentation fault (Core dumped)
View GitHub Profile
@ForumPlayer
ForumPlayer / ytapi.php
Last active July 14, 2021 17:58
Outdated Youtube API
<?php
if (isset($_GET['id'])) {
$id = trim($_GET['id']);
parse_str(file_get_contents("http://youtube.com/get_video_info?video_id=".$id),$info);
$streams = explode(',',$info['url_encoded_fmt_stream_map']);
$found = false;
foreach($streams as $stream){
parse_str($stream,$data);
if(stripos($data['type'],"video/mp4") !== false){
$found = true;
@ForumPlayer
ForumPlayer / pgp.asc
Created June 23, 2019 19:39
Personal Mail Public Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v4.4.10
Comment: https://openpgpjs.org
xsBNBFydUdwBCADCG3m3YIGQy0VnjQtXPsHSZTGzqOlHRa/PHdPFHFD4CXHD
reGDcu6gksj/P5HXNI5LMjPg4TzGHjjX/U4APZSc2CRzQhneDEU9zmR5XBz5
CbcJh7BBxc1Pow7FKY0vVm6oFdz/LicJTdapnKmvIviL8KGx3/YVSXW/WTd7
ZCzIgrWQTfjUhtMc8/oMHr1W2b/kELrM9Ij0HT+PMzRXSyJyzstHX4tYAkXS
b5tdMs5Kihk35e/BDuqbs8l7IrMYHLAeqhI74fWvZprLN4UAt8g8RYvHxwog
tKfBqXEWqs4/vW/xq/+FFvMqOUu2Nk6yAR8FtylOLucUgjjMa+HIVkUlABEB

Keybase proof

I hereby claim:

  • I am forumplayer on github.
  • I am forumplayer (https://keybase.io/forumplayer) on keybase.
  • I have a public key ASAmhB_c_0IGmvo4BHm6kQTxQPhAc_x3Tv-B8Ht0A1JcJQo

To claim this, I am signing this object:

@ForumPlayer
ForumPlayer / NO-VM-PXE.ps1
Created November 2, 2019 20:51 — forked from avitsidis/Disable-VmPxeBoot.ps1
Disable Hyper-V VM PXE Boot
param(
[Parameter(Mandatory=$true)][string]$VMName
)
#based on http://serverfault.com/questions/619763/can-pxe-boot-of-hyper-v-vms-be-disabled
$old_boot_order = Get-VMFirmware -VMName $VMName | Select-Object -ExpandProperty BootOrder
$new_boot_order = $old_boot_order | Where-Object { $_.BootType -ne "Network" }
Set-VMFirmware -VMName $VMName -BootOrder $new_boot_order
@ForumPlayer
ForumPlayer / 2019-https-localhost.md
Created October 13, 2020 23:58 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@ForumPlayer
ForumPlayer / 2019-https-localhost.md
Created October 13, 2020 23:58 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

Scripts to build some Linux programs easily

#!/bin/bash
systemctl stop snapd.socket
systemctl stop snapd.service
systemctl disable snapd.socket
systemctl disable snapd.service
apt purge snapd
rm -rf ~/snap /snap /var/snap /var/lib/snapd /var/cache/snapd /usr/lib/snapd
@ForumPlayer
ForumPlayer / script-list.md
Last active February 10, 2022 18:49
Scripts help a Linux user/sysadm life
@ForumPlayer
ForumPlayer / ..git-commit-status - Generate git commit message from git-status.md Generate git commit message from git-status. Will generate a commit message like "Added: file1.py file2.py file3.py Modified: file4.py file5.py Deleted: README.md Renamed: test.txt-> test2.txt". Put this in your .gitconfig.

git commit-status alias

An alias that will generate a git commit message staged changes as shown in git-status. Put this alias (section below) in your .gitconfig.

The message generated will be in the format of:

$ git status --porcelain
A file1.py
A file2.py
A file3.py