Skip to content

Instantly share code, notes, and snippets.

View b3k's full-sized avatar

Bartosz Pietrzak b3k

  • CodeCargo
  • Poland
View GitHub Profile
@b3k
b3k / setup.sh
Created August 23, 2023 10:22 — forked from Gazler/setup.sh
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
ulimit -n 4000000
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384'
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384'
sysctl -w net.core.rmem_max=16384
sysctl -w net.core.wmem_max=16384
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
457,,"EA Play Code 12 months",,http://localhost:4001/pl/product/ea-access-pass-code-12-months,,"EA Play is the ultimate game destination for anyone who loves EA titles. Membership gives you more of your favorite Electronic Arts games – more rewards, more exclusive trials, and more discounts.EA Play is a membership program that lets members play more games for less, only on XBOX One.Binge on a growing collection of more than 10 awesome games in The Vault, play upcoming EA games before they release for a limited time, and get an exclusive 10% discount on all EA digital purchases on XBOX One, including full game purchases, pre-orders, expansion packs, Ultimate Team Points, and everything in between. Conditions, limitations, and exclusions apply.Features:Play upcoming games before the release date, and keep your progress if you decide to purchase the game.Play EA's best XBOX One games and top franchises, with more titles being added over time.EA Access members can save 10% on all EA digital purchases on XBO

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

@b3k
b3k / ubuntu_agnoster_install.md
Created May 18, 2021 08:12 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@b3k
b3k / Flexible Dockerized Phoenix Deployments.md
Created February 26, 2018 12:31 — forked from jswny/Flexible Dockerized Phoenix Deployments.md
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai

This file has been truncated, but you can view the full file.
ProblemType: Crash
Architecture: amd64
CrashCounter: 1
Date: Tue Feb 14 14:50:13 2017
Disassembly:
=> 0x7f0badc47536 <match+6>: push %r12
0x7f0badc47538 <match+8>: mov %rdi,%r12
0x7f0badc4753b <match+11>: push %rbp
0x7f0badc4753c <match+12>: push %rbx
0x7f0badc4753d <match+13>: sub $0x1b8,%rsp

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@b3k
b3k / getCheapestProductFromCategory.php
Created March 14, 2014 10:22
Get cheapest active product from given category.
<?php
class Product {
public function getCheapestProduct() {
$data = Mage::getModel("catalog/product")->getCollection()
->addAttributeToSelect(Mage::getSingleton("catalog/config")->getProductAttributes())
->addAttributeToFilter('offer', Mage_MultiVendor_Model_Offer::STATE_ACTIVE)
->addCategoryFilter($this->getCategory())
->setPage(1, 1)
->addMinimalPrice()
->addFinalPrice()
@b3k
b3k / mado.php
Last active December 20, 2015 19:28
Magento CLI tool for creating new module/model etc.. still in dev progressUse: php bin/mado.php create_module community/Namespace/ModuleNamephp mado.php create_symlinks /target/absolute/path /source/absolute/path [--dry-run]
#!/usr/bin/env php
<?php
$mado = new Mado();
try {
if (isset($argv[1]) && strlen($argv[1]) > 0) {
$mado->run($argv[1], array_slice($argv, 2));
} else {
$mado->run('help', null);
}
} catch (Exception $e) {