Skip to content

Instantly share code, notes, and snippets.

@suvash
suvash / flake.nix
Created October 21, 2023 12:44
Elixir Nix Flake Devshell (Flake for running Elixir 1.15 / Erlang R25)
{
description = "Phoenix(Elixir) development environment";
inputs = {
nixpkgs = { url = "github:NixOS/nixpkgs/nixos-23.05"; };
flake-utils = { url = "github:numtide/flake-utils"; };
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
@suvash
suvash / chrysalis.json
Created September 13, 2021 21:16
Custom Dvorak Atreus Layout
{
"keymaps": [
[
{
"code": 52,
"label": {
"base": "'",
"shifted": "\""
}
},
@suvash
suvash / cloudflare_ddns.sh
Last active May 1, 2019 00:31
Cloudflare DNS record update via bash (for DDNS like behaviour)
#!/usr/bin/env bash
DDNS_DIR='/tmp/cf_ddns'
PREVIOUS_IP_FILE="$DDNS_DIR/dynamic_ip.txt"
CF_REQUEST_RESPONSE_FILE="$DDNS_DIR/cf_response.json"
mkdir -p "$DDNS_DIR"
[ ! -f "$PREVIOUS_IP_FILE" ] && touch "$PREVIOUS_IP_FILE"
# NEW_IP="$(dig +short myip.opendns.com @resolver1.opendns.com)"
@suvash
suvash / dhcd-resnet32-deeplearning.ipynb
Last active September 30, 2020 19:43
DHCD (Devanagari) dataset ResNet32 model fitting
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
DROP TABLE if exists d_date;
CREATE TABLE d_date
(
date_dim_id INT NOT NULL,
date_actual DATE NOT NULL,
epoch BIGINT NOT NULL,
day_suffix VARCHAR(4) NOT NULL,
day_name VARCHAR(9) NOT NULL,
day_of_week INT NOT NULL,