Skip to content

Instantly share code, notes, and snippets.

@apjyotirmay
apjyotirmay / ssh-export-pub
Last active April 14, 2025 19:22
Export public keys from your ssh agent keyring
#!/usr/bin/env bash
# This script exports your public keys from ssh keyring and saves it in ~/.ssh/pub
# with the name. This makes it easy to avoid brute forcing all key in the agent
[[ -e $HOME/.ssh/pub ]] || mkdir $HOME/.ssh/pub
while read -r line
do
FILENAME=$(echo $line | awk '{print $3}')
@apjyotirmay
apjyotirmay / .tmux.conf
Created September 9, 2024 15:46
My tmux configuration
# set hitory limit
set -g history-limit 1000
# (r) Reload source file
bind-key r source-file ~/.tmux.conf
# clear console history
bind -n C-k send-keys -R \; clear-history
# use 256 term for pretty colors
@apjyotirmay
apjyotirmay / style.css
Last active February 12, 2022 09:24
Simple styling for Nextcloud
* {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important
}
body header#header {
height: 56px !important;
box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24);
transition: all .3s cubic-bezier(.25, .8, .25, 1)
}
@apjyotirmay
apjyotirmay / 20181118235404-some-migration.js
Created October 16, 2019 09:54 — forked from s1moe2/20181118235404-some-migration.js
Sequelize migration add/drop multiple columns (transacting)
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.sequelize.transaction((t) => {
return Promise.all([
queryInterface.addColumn('table_name', 'column_name1', {
type: Sequelize.STRING
}, { transaction: t }),
queryInterface.addColumn('table_name', 'column_name2', {
type: Sequelize.STRING,
}, { transaction: t })
@apjyotirmay
apjyotirmay / damn-fast-ruby-setup.sh
Last active August 15, 2018 12:36 — forked from sandys/damn-fast-ruby-setup.sh
Set up a development environment for ruby in 30 minutes on ubuntu. This will use rbenv to take care of paths and will mimic how you would set up your production environment. A very clean separated setup conducive to integration with Puppet/chef (for installation of ruby versions) and Capistrano (for contained deployment). Allows for per-user own…
#pre-requisites
sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev git libpq-dev libmysqlclient-dev libpq-dev nodejs libcurl4-openssl-dev libffi-dev imagemagick libjpeg-progs pngcrush
############optional
sudo apt-get install vim zsh
######### optional for jruby
sudo apt-get install openjdk-7-jdk