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 / github_bitbucket_multiple_ssh_keys.md
Created June 10, 2024 03:49 — forked from yinzara/github_bitbucket_multiple_ssh_keys.md
Managing SSH keys and repo cloning using multiple accounts on GitHub and BitBucket

Why Multiple SSH keys?

There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket

You may use the same computer for work and personal development and need to separate your work.

When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.

You may have different projects you're working on where you would like to segregate your access.

@TwistingTwists
TwistingTwists / RandomToTask.elm
Created October 6, 2019 11:13 — forked from JoelQ/RandomToTask.elm
Turn an Elm random generator into task, allowing it to be chained with other side effects.
-- 0.19
randomToTask : Generator a -> Task Never a
randomToTask generator =
Time.now
|> Task.map (Tuple.first << Random.step generator << Random.initialSeed << Time.posixToMillis)
-- 0.18
module ID exposing (ID(..), decodeFromString, decoder, encode, encodeAsString, fromInt, toInt, toString)
import Json.Decode as Decode exposing (Decoder)
import Json.Encode as Encode exposing (Value)
{-| This type ensures you get a type error if you for example accidentally pass a UserId in place of a CompanyId
-}
type ID phantom
= ID Int
@TwistingTwists
TwistingTwists / .gitignore
Created April 13, 2019 11:59 — forked from olooney/.gitignore
worked examples of argparse and python logging
logs/
port module Main exposing (main)
import Browser
import Html exposing (Html)
import Html.Attributes
import Html.Events
main =
Browser.element
{ init = init
@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 / 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/