Skip to content

Instantly share code, notes, and snippets.

View sanjayankur31's full-sized avatar

Ankur Sinha sanjayankur31

View GitHub Profile
sudo yum -y install python-virtualenv
virtualenv my-venv
source my-venv/bin/activate
git clone url-for-bloom
cd bloom
python develop
diff --git a/fpaste b/fpaste
index 7a2eefe..d33461a 100755
--- a/fpaste
+++ b/fpaste
@@ -20,7 +20,7 @@ VERSION = ''
USER_AGENT = 'fpaste/' + VERSION
SET_DESCRIPTION_IF_EMPTY = 1 # stdin, clipboard, sysinfo
sanjayankur31 / sqldeveloper-fedora25.rst
Last active November 16, 2016 23:24
Using SQL Developer off campus on Fedora 25 Linux

VPN access

In a terminal:

sudo openconnect --juniper

It'll ask for credentials. Staff will use: <your studynet id>@staff while students will use: <your studynet id>@student

matthewbednarski / mimeapps.list
Created March 11, 2015 10:44
Instruct xdg to use mutt as default email application. Both files go in ~/.local/share/applications
[Default Applications]
nagapavan /
Created April 25, 2018 09:33
npm hacks
function npm-freeze() {
# npm ls | grep -E "^(├|└)─" | cut -d" " -f2 | awk -v quote='"' 'BEGIN { FS = "@" } ; { print quote $1 quote,":",quote $2 quote"," }' | sed -e 's/ :/:/g'
entries=`npm list --depth=0 -prod true "$@" 2>/dev/null | grep -v "UNMET PEER DEPENDENCY\|peer dep missing" | grep -E "^(├|└)─" | cut -d" " -f2`
echo '"dependencies" : {'
for entry in ${entries}; do
if [[ $entry =~ ^@.* ]]; then
# echo $entry
echo $entry | awk -v quote='"' -v attherate='@' 'BEGIN { FS = "@" }; { print quote attherate $1$2 quote,":",quote $3 quote"," }'
fmela / stacktrace.cxx
Last active September 22, 2023 10:58
A C++ function that produces a stack backtrace with demangled function & method names.
* Copyright (c) 2009-2017, Farooq Mela
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
kogakure / .gitignore
Last active December 17, 2023 08:21
Git: .gitignore file for LaTeX projects
mbbx6spp /
Last active December 21, 2023 05:05
Gerrit vs Github for code review and codebase management

Gerrit vs Github: for code review and codebase management

Sure, Github wins on the UI. Hands down. But, despite my initial annoyance with Gerrit when I first started using it almost a year ago, I am now a convert. Fully. Let me tell you why.

Note: This is an opinionated (on purpose) piece. I assume your preferences are like mine on certain ideas, such as:

  • Fast-forward submits to the target branch are better than allowing merge commits to the target branch. The reason I personally prefer this is that, even if a non-conflicting merge to the target branch is possible, the fact that the review/pull request is not up to date with the latest on the target branch means feature branch test suite runs in the CI pipeline reporting on the review/PR may not be accurate. Another minor point is that forced merge commits are annoying as fuck (opinion) and clutter up Git log histories unnecessarily and I prefer clean histories.
  • Atomic/related changes all in one commit is something worth striving for. Having your dev
rcoup /
Created April 10, 2013 21:52
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
set -e
# Usage:
# [--parallel=N] [rsync args...]
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
# Notes:
Soft / keys
Created May 6, 2011 15:39
More vim like ncmpcpp keys config
key_move_song_up = 'K'
key_move_song_down = 'J'
key_next_found_position = 'n'
key_prev_found_position = 'N'
key_prev_column = 260 'h'
key_next_column = 261 'l'
key_lyrics = '.'
key_home = 262 'g'
key_end = 360 'G'