Skip to content

Instantly share code, notes, and snippets.

View silentsudo's full-sized avatar

Ashish Agre silentsudo

  • Bangalore
View GitHub Profile
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@silentsudo
silentsudo / neo4j_cypher_cheatsheet.md
Created July 5, 2020 11:43 — forked from DaniSancas/neo4j_cypher_cheatsheet.md
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
@silentsudo
silentsudo / pruneRemote.sh
Created February 18, 2018 18:37 — forked from lkopocinski/pruneRemote.sh
Git command for pruning remote branches
git remote prune origin
@silentsudo
silentsudo / pruneDryRun.sh
Created February 18, 2018 18:37 — forked from lkopocinski/pruneDryRun.sh
Git command for reporting what would be pruned
git remote prune origin --dry-run
@silentsudo
silentsudo / deleteMerged.sh
Created February 18, 2018 18:37 — forked from lkopocinski/deleteMerged.sh
Git command for deleting merged branches
git branch --merged | grep -E -v "master|develop" | xargs git branch -d
@silentsudo
silentsudo / gitconfig
Created February 18, 2018 18:37 — forked from lkopocinski/gitconfig
Git branches aliases
[alias]
po = !git remote prune origin
dm = !git branch --merged | grep -E -v \"master|develop\" | xargs git branch -d
@silentsudo
silentsudo / multiple_ssh_setting.md
Created October 16, 2017 10:02 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;
@silentsudo
silentsudo / MultipartFileSender
Created January 6, 2017 08:48 — forked from davinkevin/MultipartFileSender
Implementing HTTP byte-range requests in Spring 4 and other framework...
package lan.dk.podcastserver.utils.multipart;
import lan.dk.podcastserver.utils.MimeTypeUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@silentsudo
silentsudo / gist:580f17a5f1733a20e68164061b27c01e
Created July 7, 2016 06:16 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote