Skip to content

Instantly share code, notes, and snippets.

View rajadain's full-sized avatar

Terence Tuhinanshu rajadain

View GitHub Profile
@rajadain
rajadain / epr_workflow.sh
Created November 13, 2023 15:42
EPR Workflow for Model My Watershed
#!/usr/bin/env bash
set -ex
###
# Basic settings
###
# Model My Watershed URL to hit
MMW_API_URL="http://localhost:8000/api"
@rajadain
rajadain / ConEmu-MaterialTheme.xml
Last active November 6, 2023 08:57
ConEmu Material Theme
<key name="Colors" modified="2015-12-10 22:46:43" build="151210">
<value name="Count" type="dword" data="00000001"/>
<key name="Palette1" modified="2015-12-10 22:46:43" build="151210">
<value name="Name" type="string" data="Material Theme"/>
<value name="ColorTable00" type="dword" data="004d4335"/>
<value name="ColorTable01" type="dword" data="006b60eb"/>
<value name="ColorTable02" type="dword" data="008de8c3"/>
<value name="ColorTable03" type="dword" data="0095ebf7"/>
<value name="ColorTable04" type="dword" data="00c4cb80"/>
<value name="ColorTable05" type="dword" data="009024ff"/>
@rajadain
rajadain / wbd.ipynb
Created August 3, 2022 15:58
Demo of using HyRiver to query Watershed Boundary Data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rajadain
rajadain / rename-s10-to-dropbox.ps1
Created October 13, 2019 12:51
Renames .MP4 files from Samsung Galaxy S10 filename style to Dropbox "Camera Upload" filename style
Get-ChildItem "." -Filter "*.mp4" | Foreach-Object {
$year = $_.BaseName.Substring(0, 4)
$month = $_.BaseName.Substring(4, 2)
$day = $_.BaseName.Substring(6, 2)
$hour = $_.BaseName.Substring(9, 2)
$minute = $_.BaseName.Substring(11, 2)
$second = $_.BaseName.Substring(13, 2)
$newName = "$($year)-$($month)-$($day) $($hour).$($minute).$($second)"
@rajadain
rajadain / haskellbook-chapter-5-notes.md
Created July 18, 2017 03:25
Haskell Book Chapter 5 Notes and Exercises

Notes and Exercises from Chapter 5 of Haskell Book

Benefits of a type system:

  • Many errors caught before program execution, at compile time
  • Compiler optimizations
  • Documentation of programs
  • Less code to write because you don't have to validate data at every step

Many, perhaps most, programming languages have type systems that feel like haggling with a petty merchant. Haskell provides a type system that more closely resembles a quiet, pleasant conversation with a colleague than an argument in the bazaar.

@rajadain
rajadain / README.md
Created January 2, 2019 16:51
JSX Ternary Conditional Assignment

JSX Ternary Conditional Assignment

Straight

const legend = isCropLayerActive ? (
    <div
        className="layercontrol__legend"
        onMouseOver={disableMapZoom}
 onFocus={disableMapZoom}
@rajadain
rajadain / README.md
Last active February 18, 2019 23:05
MMW UtfGrid Visualizer

MMW UtfGrid Visualizer

Instructions

Have MMW running locally. Open this page. Hover over the map to highlight UTFGrid blocks.

Credits

Pieced together with ideas from:

@rajadain
rajadain / github-hasklig-fira-code-style.css
Last active February 6, 2019 19:43
Hasklig / Fira Code on GitHub Stylish CSS
@-moz-document domain("github.com"), domain("gist.github.com"), domain("render.githubusercontent.com") {
/* Hasklig https://github.com/i-tu/Hasklig */
/* Fira Code https://github.com/tonsky/FiraCode */
/* Ligaturizer https://github.com/ToxicFrog/Ligaturizer */
.branch-name,
.blob-num,
.blob-code-inner,
.CodeMirror pre,
.commit .sha,
.commit-desc pre,
@rajadain
rajadain / README.md
Last active September 4, 2018 17:52
subbasin-diff

Diff in Subbasin results of "South Branch Rancocas Creek, HUC-10 Watershed ID 0204020202" between baseline (production) and post-land use change in WikiWatershed/model-my-watershed#2944

@rajadain
rajadain / haskellbook-chapter-22-exercises.hs
Last active December 20, 2017 22:31
Notes and exercises for Haskell Book Chapter 22: Reader
module ExerciseChapter22 where
import Control.Applicative
import Data.Maybe
x = [1, 2, 3]
y = [4, 5, 6]
z = [7, 8, 9]
xs :: Maybe Integer