Skip to content

Instantly share code, notes, and snippets.

View painfull30's full-sized avatar

Petrunin Alex painfull30

View GitHub Profile
@LoganTann
LoganTann / buildSVP.sh
Last active May 8, 2024 12:37
Build SVP for ubuntu 20.04
## source : https://www.youtube.com/watch?v=ABrO2kdXCWE
## but I fixed some bugs
## this installs dependancies used to get the dependancies and some sources + build tools
sudo apt-get update
sudo apt-get install g++
sudo apt-get update -y
sudo apt-get install -y beignet-opencl-icd
sudo apt-get install mediainfo
sudo apt-get install libqt5concurrent5 libqt5svg5 libqt5qml5
@hranicka
hranicka / ob.php
Last active May 5, 2023 14:52
PHP flush() under Apache, mod_proxy, php-fpm
<?php
function doFlush()
{
if (!headers_sent()) {
// Disable gzip in PHP.
ini_set('zlib.output_compression', 0);
// Force disable compression in a header.
// Required for flush in some cases (Apache + mod_proxy, nginx, php-fpm).
@IntergalacticApps
IntergalacticApps / make_windows10_great_again.bat
Last active August 25, 2024 15:23
Make Windows 10 Great Again - stop Windows 10 spying!
@echo off
setlocal EnableDelayedExpansion
ver | find "10." > nul
if errorlevel 1 (
echo Your Windows version is not Windows 10... yet. Brace yourself, Windows 10 is coming^^!
pause
exit
)
@jpclipffel
jpclipffel / bash_flock.sh
Last active July 11, 2024 10:56
Bash flock example
#!/bin/bash
#
# Bash `flock` example.
# Works on: Linux, BSD
# Doesn't work on: MacOS
# The file which represent the lock.
LOCKFILE="`basename $0`.lock"
# Timeout in seconds.
@defacto133
defacto133 / tmt20ii_status.php
Last active December 7, 2019 07:33
Get TM-T20II Epson ASB status through UDP socket
/*
* $status = {
* "status": "online" | "offline",
* "cover": "open" | "closed", (opt)
* "feeding": "feeding" | "not", (opt)
* "autocutterError": "error" | "not", (opt)
* "unrecoverableError": "error" | "not", (opt)
* "recoverableError": "error" | "not", (opt)
* "paper": "paperEnd" | "paperPresent" (opt)
* }
@jonlabelle
jonlabelle / string-utils.js
Last active July 8, 2024 21:19
Useful collection of JavaScript string utilities.
// String utils
//
// resources:
// -- mout, https://github.com/mout/mout/tree/master/src/string
/**
* "Safer" String.toLowerCase()
*/
function lowerCase(str) {
return str.toLowerCase();