Skip to content

Instantly share code, notes, and snippets.

View darius-telycenas's full-sized avatar

Darius Telyčėnas darius-telycenas

  • Berlin
View GitHub Profile
@ChevyRay
ChevyRay / qoi.rs
Created November 24, 2021 22:49
QOI - Quote OK Image Format (Rust Port)
const INDEX: u8 = 0x0;
const RUN_8: u8 = 0x40;
const RUN_16: u8 = 0x60;
const DIFF_8: u8 = 0x80;
const DIFF_16: u8 = 0xc0;
const DIFF_24: u8 = 0xe0;
const COLOR: u8 = 0xf0;
const MASK_2: u8 = 0xc0;
const MASK_3: u8 = 0xe0;
@silbinarywolf
silbinarywolf / go.mod
Created October 5, 2021 07:56
Force pull in github.com/go-gl/glfw/v3.3/glfw via golang.org/x/exp
module github.com/silbinarywolf/grpc-repro
go 1.17
require (
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a
google.golang.org/grpc v1.39.0
)
@sbeyer
sbeyer / lib.rs
Created May 16, 2021 23:00
For loop vs map in Rust
#![feature(test)]
extern crate test;
use std::net::*;
pub struct Foo {
a: u8,
b: u8,
c: u8,
@rdump
rdump / kubectl-multi-version-brews.md
Last active April 4, 2024 15:20
kubectl multi-version brews (kubernetes-cli formula)

kubectl multi-version brews

Applicability

The instructions below apply to older versions of Homebrew which still provide switch capability.

For current Homebrew, you'll likely need to keep Versions around, and build locally. Here's my versions repository https://github.com/rdump/homebrew-versions

MacPorts is now keeping versioned installations available as well, by default.

@svpernova09
svpernova09 / README.md
Created October 24, 2017 18:01
How to test Homestead & Hyper-V

Prerequisities:

  • Ensure you have Windows 10 & The Fall Creators Update installed.
  • Uninstall Virtualbox
  • Enable Hyper-V
  • Create a new Virtual Switch in Hyper-V that is type "External" (You'll use this whenever asked)

Edit Homestead

Add / edit these 2 lines in your Homestead.yaml

@bladeSk
bladeSk / SQLite-PHP-quickstart.php
Last active March 5, 2025 23:49
SQLite3 PHP Quickstart Tutorial
<?php
// This file walks you through the most common features of PHP's SQLite3 API.
// The code is runnable in its entirety and results in an `analytics.sqlite` file.
// Create a new database, if the file doesn't exist and open it for reading/writing.
// The extension of the file is arbitrary.
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
// Errors are emitted as warnings by default, enable proper error handling.
@jawira
jawira / fibonacci.php
Last active June 20, 2019 08:27
Testing PHP7 features with Fibonacci sequence function
<?php
/**
* Succinct Fibonacci function
*
* Returns the first N Fibonacci numbers specified as parameter.
*
* This function has not been written for efficiency nor readabilty, instead it has
* been created for fun and for testing the latest PHP features (E.g.: generators,
* literal dereferencing, type hinting, short array syntax, ...).
*
@growdigital
growdigital / installConfig.sh
Last active March 17, 2019 09:29
Install script for brew and cask for Mac OS X
#!/bin/sh
#
# Brew packages
#
brew install git
# brew install node - having npm install issues, so installed manually
brew install wget
brew install homebrew/php/php56
brew install homebrew/php/composer
# brew install task - didn't install with gnutls, had to make from source
@j3j5
j3j5 / gist:8b3e48ccad746b90a54a
Last active November 16, 2023 15:11
Adyen Test Card Numbers
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
08/2018 OR 10/2020 737 7373