Skip to content

Instantly share code, notes, and snippets.

View davidsarkany's full-sized avatar

Dávid Sárkány davidsarkany

View GitHub Profile
@ptupitsyn
ptupitsyn / Dockerfile
Created June 15, 2023 13:05
Working .NET multi-arch Docker build (ARM + Intel)
# See https://devblogs.microsoft.com/dotnet/improving-multiplatform-container-support/
# 8.0-preview-alpine works too
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-preview AS build
ARG TARGETARCH
WORKDIR /source
# copy csproj and restore as distinct layers
COPY *.csproj .
RUN dotnet restore -a $TARGETARCH
@rrd108
rrd108 / xdebug.ini
Last active October 27, 2021 11:23
xdebug 3 setup
;read this for more info: https://xdebug.org/docs/upgrade_guide
zend_extension=xdebug.so
;mode is a new setting. debug let us use debugger in an IDE, develop enhances var_dump output
xdebug.mode=debug,develop
;default port changed to 9003, so we should change this in our IDE also
xdebug.client_port=9003
;trigger it via get variable or cookie
xdebug.start_with_request=trigger
xdebug.remote_log="/tmp/xdebug.log"
xdebug.cli_color=2
Note: I don't know where does this thread belongs. If I'm on the incorrect section, move it to the correct one.
Many people are literally just selling this method and I feel like sharing this out so that you don't have to pay because the seller just don't do a minute of work to get you the drive.
So moving straight towards the method:
Step I:
Go to this link: https://td.fastio.me/ (mirrors to be left at the last)
Step II:
Type your desired drive's name at the first field and your Gmail on the bottom field.
@n-ts
n-ts / worker.js
Created October 3, 2018 20:21
Cloudflare Workers - Load balancing to nearest datacenter from current POP
/*
--------------------------------------------------------
Please note that this grouping is just for example...
You can rearrange POPs, remove or add dacaneters according to your needs.
--------------------------------------------------------
First, we have to get all Cloudflare POP codes (three letter airport codes) from https://www.cloudflarestatus.com/
North America is routed to Chigaco datacenter;
Europe, Africa and Middle East is routed to Amsterdam datacenter;
@Jamesits
Jamesits / ubuntu_enable_bbr.sh
Last active December 13, 2022 22:27
Ubuntu enable BBR
#!/bin/bash
set -eu
SYSCTL_FILE=/etc/sysctl.d/90-tcp-bbr.conf
# check root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
@davidrushton
davidrushton / Kernel.php
Created February 17, 2016 17:29
Laravel 5 Database Queue - Shared Hosting
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
@odan
odan / xampp_php7_xdebug.md
Last active April 17, 2024 05:36
Installing Xdebug for XAMPP
@lolzballs
lolzballs / HelloWorld.java
Created March 22, 2015 00:21
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();