Skip to content

Instantly share code, notes, and snippets.

View TwistingTwists's full-sized avatar
💭
Elixir dev

Abhishek Tripathi TwistingTwists

💭
Elixir dev
View GitHub Profile
@TwistingTwists
TwistingTwists / whiteboard.sh
Last active November 24, 2015 16:26 — forked from lyoshenka/whiteboard_clean.sh
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
#!/bin/bash
convert "$1" -resize %50 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
# source: http://www.reddit.com/r/commandline/comments/1weqnn/cli_oneliner_script_to_clean_up_and_beautify/

Topic [more concise] : "Poetry, Collaboration and People - Sublimation of knowledge by doing and seeing." Brief Intro : "Five years of literature, learning from people, then, learning from history." OneLine Intro : member at TLS


						Love and effort are infinite.
						Learn from juniors.

Set things in perspective.

@TwistingTwists
TwistingTwists / mindmap.elm
Created March 2, 2019 08:07
mindmapping in elm
-- Reference: http://freemind.cvs.sourceforge.net/viewvc/freemind/freemind/freemind.xsd?pathrev=fm_0_9_0_beta2&revision=1.1.2.4
module Main exposing (Hook(..), Icon(..), Map(..), Model(..), Node(..), NodeAttributes, NodeChild(..), Position(..))
-- import Maybe exposing (Maybe(Just, Nothing))
-- import Color
-- import Time
import Basics exposing (..)
import Browser
@TwistingTwists
TwistingTwists / Decoder.elm
Last active March 19, 2019 17:04
Decoders in Elm
[deprecated]. See : https://gist.github.com/TwistingTwists/1bf880bea1300a26966ddccd9a2c7c8e
-- using Json.Decoder.Pipeline -- elm install noredink/elm-decode-pipeline
{-
Please take note that in
type Map = Map {version: String, node : Node}
@TwistingTwists
TwistingTwists / recursive_nodes.elm
Created March 22, 2019 09:05
recursive nodes in Elm
module Main exposing (main)
import Browser
import Html exposing (..)
import Html.Events exposing (onClick)
-- The node value and a list of child nodes
type Node a
= Node a (List (Node a))
@TwistingTwists
TwistingTwists / montage-dot.sh
Created March 26, 2019 03:20 — forked from drmalex07/montage-dot.sh
Merge (montage) multiple DOT files in a single PNG. #bash #graphviz #montage #dot
#!/bin/bash
#
# Create a single PNG image from a sequence of DOT files (describing a graph)
#
# Parse command line
outfile="graph.png"
@TwistingTwists
TwistingTwists / dump_mains.json
Created March 26, 2019 03:51
sample json mindmap data
This file has been truncated, but you can view the full file.
{
"map": {
"@version": "freeplane 1.7.0",
"node": {
"@TEXT": "UPSC",
"@LOCALIZED_STYLE_REF": "default",
"@FOLDED": "false",
"@ID": "ID_523629448",
"@CREATED": "1487759666321",
"@MODIFIED": "1489498611522",
port module Main exposing (main)
import Browser
import Html exposing (Html)
import Html.Attributes
import Html.Events
main =
Browser.element
{ init = init
@TwistingTwists
TwistingTwists / testing_decoder.elm
Created March 26, 2019 13:14
testing_decoder_throway
module TestDecoder exposing (Node(..), input, main)
import Browser
import Html exposing (Html, button, div, text)
import Html.Events exposing (onClick)
import Json.Decode as Decode exposing (..)
import Json.Decode.Pipeline exposing (custom, hardcoded, optional, required)
type Node
{
"map": {
"@version": "freeplane 1.7.0",
"node": {
"@TEXT": "Central\nIdea",
"node": [
{
"@TEXT": "IDEA 1",
"@POSITION": "right",
"@ID": "ID_273436263",