Skip to content

Instantly share code, notes, and snippets.

View asit-dhal's full-sized avatar

Asit Kumar Dhal asit-dhal

View GitHub Profile
#!/usr/bin/env python
# An example of decoding/encoding datetime values in JSON data in Python.
# Code adapted from: http://broadcast.oreilly.com/2009/05/pymotw-json.html
from datetime import datetime
import json
from json import JSONDecoder
from json import JSONEncoder
@asit-dhal
asit-dhal / cmdoptions.cpp
Created June 3, 2016 13:53 — forked from randomphrase/cmdoptions.cpp
Demonstration of how to do subcommand option processing with boost program_options
#define BOOST_TEST_MODULE subcommand options
#include <boost/test/unit_test.hpp>
#include <boost/program_options.hpp>
#include <boost/variant/variant.hpp>
#include <boost/variant/get.hpp>
struct GenericOptions {
bool debug_;
};
@asit-dhal
asit-dhal / README.md
Created September 30, 2016 11:18 — forked from miguelmota/README.md
Multiple accounts with Mutt E-Mail Client
How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@asit-dhal
asit-dhal / git-branch-delete.sh
Created February 27, 2018 17:39
An interactive bash shell script to delete remote git branches
#!/bin/bash
# An interactive script that allows you to delete multiple remote branches from
# a git repository with confirmation before deletion.
#
# Provide the path to the git repo as an argument to the script or it will
# prompt you for the path to the repo
#
# @version 0.1
# @author Evan Reeves <develop@evanreeves.com>

Rich Hickey on becoming a better developer

− Avatar Rich Hickey • 3 years ago Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@asit-dhal
asit-dhal / varprops.cmake
Created July 25, 2019 16:44 — forked from dlrdave/varprops.cmake
Demonstrate get_property usage for VARIABLE and CACHE properties
# This section of the documentation lists the properties available on
# CMake cache entries:
#
# http://cmake.org/cmake/help/v2.8.12/cmake.html#section_PropertiesonCacheEntries
#
#
# This code demonstrates retrieving the property values from a variable or
# cache entry.
#
@asit-dhal
asit-dhal / ca.md
Created October 7, 2021 22:21 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.