Skip to content

Instantly share code, notes, and snippets.

View dmitryrck's full-sized avatar

Dmitry L Rocha dmitryrck

View GitHub Profile
@dmitryrck
dmitryrck / dot-config-nixpkgs-home.nix
Created December 19, 2023 13:53
My ~/.config/nixpkgs/home.nix
{ config, pkgs, lib, ... }:
{
programs.home-manager.enable = false;
home.homeDirectory = "/Users/dmitry";
home.username = "dmitryrck";
home.stateVersion = "22.11";
home.packages = [
pkgs.aria2
@dmitryrck
dmitryrck / README.md
Last active March 27, 2022 02:03
Easy iPod Shuffle Syncer

These are easy to follow instructions, adapt them for your needs 😉.

  1. (IMPORTANT) Create a directory ~/iPod
  2. (IMPORTANT) Mount your iPod in /ipod
  3. Place all of your songs/podcasts into ~/iPod/music
  • Each (first level) directory/folder is one playlist
  1. Run this script

WARNING: if you are in a case sensitive filesystem (very likely if you are using linux) the case of the directories matter.

#!/bin/bash
# I am not the author of this script.
# Unfortunately I don't remember where I copied from.
file="${1}"
bucket="${2}"
s3Key="${3}"
s3Secret="${4}"

Keybase proof

I hereby claim:

  • I am dmitryrck on github.
  • I am dmitryrck (https://keybase.io/dmitryrck) on keybase.
  • I have a public key ASAL4TeWH7gczP8CgGUGd1iUGoqT-EvNGKef7omz8azW8wo

To claim this, I am signing this object:

$ docker run --rm -v $(pwd):/app -w /app ruby:2.3.7 bash -c "gem install benchmark-ips; ruby /app/benchmark.rb"
Successfully installed benchmark-ips-2.7.2
1 gem installed
{:a=>"1", :b=>2, :c=>nil}
Warming up --------------------------------------
`Hash#[:a] || 3` (key exist)
                       148.791k i/100ms
`Hash#[:c] || 3` (key is nil)
                       141.521k i/100ms
source "https://rubygems.org"
gem "pg"
gem "sequel_pg", require: "sequel"
@dmitryrck
dmitryrck / README.md
Last active October 5, 2019 21:35
Script to copy Google Chrome profile to ram and after it closes copy back to disk. It does not sync often. Be aware: you can lose your work, login and also sync your profile with a Google account.

google-chrome-ram.sh

How to run

Download google-chrome-ram.sh make it executable and call it with or without a profile name.

If you call it like this:

$ ./google-chrome-ram.sh
data.json