Skip to content

Instantly share code, notes, and snippets.

View KostasKostogloy's full-sized avatar
🏠
Working from home

Kostas Kostoglou KostasKostogloy

🏠
Working from home
  • Thessaloniki, Greece
View GitHub Profile
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active May 20, 2025 03:39
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@h-collector
h-collector / Foo.php
Last active March 21, 2025 21:54
Standalone Laravel Queue + Redis example
<?php
namespace Jobs;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Redis\Database as Redis;
class Foo extends Job
{
use InteractsWithQueue;
@waylaidwanderer
waylaidwanderer / KeyUserHandler.cs
Last active February 8, 2018 21:52
Keybanking bot written by http://steamcommunity.com/id/waylaidwanderer/ - coded using SteamBot wrapper (https://github.com/Jessecar96/SteamBot) THERE IS NO SUPPORT FOR THIS USERHANDLER. This code is outdated, may be exploitable, and should only be used as a guideline. Use at your own personal risk.
using SteamKit2;
using System.Collections.Generic;
using SteamTrade;
using System;
using System.Timers;
namespace SteamBot
{
public class KeyUserHandler : UserHandler
{
@zigotica
zigotica / youtube-poster-frame.css
Last active August 8, 2024 22:50
Very simple method to add custom poster frame to youtube video without using youtube API. This code is also valid in browsers not supporting window.postMessage (API uses postMessage). The trick is adding the iframe in a comment. Javascript reads comment contents and saves iframe definition to a var. When JQuery (for the sake of brevity, not real…
.video { position: relative; padding-bottom: 56.25%; /* 16:9 */ height: 0; }
.video img { position: absolute; display: block; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; cursor: pointer; }
.video:after { content: ""; position: absolute; display: block;
background: url(play-button.png) no-repeat 0 0;
top: 45%; left: 45%; width: 46px; height: 36px; z-index: 30; cursor: pointer; }
.video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/* image poster clicked, player class added using js */
.video.player img { display: none; }
.video.player:after { display: none; }