Skip to content

Instantly share code, notes, and snippets.

View olebedev's full-sized avatar
🎾

Oleg Lebedev olebedev

🎾
View GitHub Profile
@olebedev
olebedev / minecraft-bedrock-server.nix
Created November 19, 2023 23:11 — forked from datakurre/minecraft-bedrock-server.nix
Minecraft Bedrock Server NixOS module
{ config, lib, pkgs, ... }:
let
libCrypto = with pkgs; stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "minecraft-bedrock-server-libcrypto";
version = "1.16-201.02";
src = fetchurl {
url = "https://minecraft.azureedge.net/bin-linux/bedrock-server-1.16.201.02.zip";
@olebedev
olebedev / parse-yarn-lock.nix
Created May 22, 2023 05:57 — forked from bouk/parse-yarn-lock.nix
Parse a v1 yarn.lock into a nix expression. Try it with `nix eval -f parse-yarn-lock.nix`
# Parse a yarn.lock file using pure Nix
# yarn.lock v1 files are basically YAML with support for having multiple keys for a single value in a map and without array support.
# Inspired by https://github.com/yarnpkg/yarn/blob/158d96dce95313d9a00218302631cd263877d164/src/lockfile/parse.js
with builtins;
let
# Add index to a list of elements
enumerate = list: genList (i: ({ inherit i; e = elemAt list i; })) (length list);
mkToken = type: value: { inherit type value; };
parseLockfile = str: let
@olebedev
olebedev / free-database-hosting.md
Created September 4, 2022 22:53 — forked from bmaupin/free-database-hosting.md
Free database hosting
@olebedev
olebedev / codimd-dependencies.nix
Created May 21, 2021 08:27 — forked from sternenseemann/codimd-dependencies.nix
Example of a minified nix output of yarn2nix for the CodiMD/server project yarn.lock
{ fetchurl, fetchgit }:
self:
super:
let
registries = {
yarn = n:
v:
"https://registry.yarnpkg.com/${n}/-/${n}-${v}.tgz";
npm = n:
v:
@olebedev
olebedev / .gitignore
Last active April 19, 2020 22:38 — forked from jgamblin/slackspotify.sh
A Script To Set Current Spotify Song As Slack Status
.apikey
@olebedev
olebedev / The Technical Interview Cheat Sheet.md
Created June 4, 2018 06:20 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@olebedev
olebedev / fresh-chrome-with-custom-tz.sh
Created December 16, 2017 05:33 — forked from prasadsilva/fresh-chrome-with-custom-tz.sh
Launch new instances of Google Chrome on OS X with isolated cache, cookies, user config and custom Timezone
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every
@olebedev
olebedev / _upgrade-pg9.4-to-pg9.5.md
Created August 2, 2017 10:29 — forked from chbrown/_upgrade-pg9.4-to-pg9.5.md
Upgrade PostgreSQL 9.4 to 9.5 on Mac OS X with Homebrew

First, check your current config (example output in homebrew.mxcl.postgresql.plist.xml lower down in this gist):

cat ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Most importantly, note the -D /usr/local/var/postgres argument.

Second, shut down your current PostgreSQL.

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
@olebedev
olebedev / ffmpeg-compress-mp4
Created January 28, 2017 19:10 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@olebedev
olebedev / README.md
Created December 30, 2016 06:31 — forked from rjeczalik/README.md
Go, multiple packages and coveralls.io

Go, multiple packages and coveralls.io

Single profile for single Go package

For Go projects that consist of only one package, the following Travis configuration is enough to get started with coveralls.io. You may want to encrypt your $COVERALLS_TOKEN via Travis encryption keys though.

language: go
go:
 - 1.3.1