Skip to content

Instantly share code, notes, and snippets.

View dineshviswanath's full-sized avatar

Dinesh Viswanath dineshviswanath

View GitHub Profile

My 2Do tasks

This is just contents of my never ending lists of tasks I tagged in 2Do with read, watch and check tags.

All lists are sorted by priority. I hope to bring all these lists closer to 0 when I get time. But until then, perhaps you will find something interesting in them.

Here are the lists I share so far.

@nicolaballotta
nicolaballotta / kubecontext.zsh
Last active February 14, 2023 23:46
Add Kubernetes context to your zsh prompt (for Agnoster theme, but can easily be adapted to different themes)
# INSTALLATION
# - Add the following function to your .oh-my-zsh/themes/agnoster.zsh-theme
# - Call prompt_kubecontext from build_prompt() as showed in the example below
#
#
# build_prompt() {
# prompt_kubecontext
# }
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active October 26, 2024 16:38
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@maksadbek
maksadbek / golang-linked-list.go
Created April 27, 2016 21:43
golang linked list implementation
package main
import "fmt"
type Node struct {
prev *Node
next *Node
key interface{}
}
@gaearon
gaearon / slim-redux.js
Last active May 5, 2024 15:14
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@beforeyouknowit
beforeyouknowit / plex_on_appletv.md
Last active March 27, 2017 21:53
Plex on AppleTV via Intel Edison

Bridging Plex onto AppleTV with PlexConnect and Intel Edison

Intel Edison Mini Breakout Board

For this tutorial you will need:

  • An Intel Edison and Mini Breakout Board or Arduino Breakout Board. Note: Your Edison needs to be running factory Yocto and/or updated Yocto via Intel's Phone Flash Tool, but NOT ubilinux. YMMV with other linux distros.
  • At least 2x USB to Micro-USB data cables. (Careful, some are only good for charging.)
  • An AppleTV, i.e. Model A1469 or similar revision 3 hardware, running the most up-to-date AppleTV OS package, i.e. 7.2 or greater. No AppleTV jailbreaks or root exploits are required for this workaround.
  • A reasonably fast (sustained 10Mbps or greater) local wireless network with a known SS
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 19, 2024 11:04
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@alukach
alukach / admin.py
Created January 5, 2015 04:47
Custom Django Admin Form via Fake Model
from django.contrib import admin, messages
from django.http import HttpResponseRedirect
from django.shortcuts import render
from my_app.forms import CustomForm
class FakeModel(object):
class _meta:
app_label = 'my_app' # This is the app that the form will exist under
@neomatrix369
neomatrix369 / PerformanceRelated.md
Last active November 3, 2023 20:27
Interesting links in the areas of HPC, low latency, mechanical harmony/sympathy, garbage collection
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik