Skip to content

Instantly share code, notes, and snippets.

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
!fonts&stuff
xterm*faceSize: 20
xterm*eightBitInput: false
XTerm*faceName: Meslo LG S DZ
!Background & foreground
XTerm*background: #002B36
XTerm*foreground: #D2D2D2
XTerm*borderColor: #343434
!Turning off scrollbar
# Installing a new package
- Download package from CTAN (https://ctan.org)
- unzip it in `~/texmf/tex/latex/`
- Run `texhash`
# Converting pdf to png
pdftoppm <input> <output-name> -png
@vaibhav276
vaibhav276 / .spacemacs
Last active October 11, 2019 14:03
Home spacemacs file
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
# Create a keypair
ssh-keygen
# Copy public key to remote machine
ssh-copy-id user@host
# Ssh to remote machine without using paaswords
ssh user@host
@vaibhav276
vaibhav276 / .spacemacs
Last active June 13, 2018 03:37
Work .spacemacs file
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@vaibhav276
vaibhav276 / git-serve.md
Created July 21, 2017 12:18 — forked from datagrok/git-serve.md
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.

Launch a one-off git server from any local repository.

I [tweeted this already][1] but I thought it could use some expansion:

Enable decentralized git workflow: git config alias.serve "daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/"

Say you use a git workflow that involves working with a core "official" repository that you pull and push your changes from and into. I'm sure many companies do this, as do many users of git hosting services like Github.

Say that server, or Github, goes down for a bit.

@vaibhav276
vaibhav276 / instGlobal.sh
Created July 6, 2017 08:28
How to install GNU Global 6.4 on Ubuntu 14.04
#!/bin/bash
# instGlobal.sh
echo "instGlobal.sh ...."
echo "install package for GNU global..."
sudo apt-get update
sudo apt-get -y install curl
sudo apt-get -y install wget
sudo apt-get -y install ncurses-dev
@vaibhav276
vaibhav276 / cc_validate.hs
Created May 18, 2016 11:27
Haskell - Validate credit card number
{-
Credit card number validation steps:
1. Convert card number to a string of integers
2. Reverse it
3. Double the digits at even locations
4. Calculate sum of individual digits
eg. [2,12,3,10,2,16] should be evaluated as 2+1+2+3+1+0+2+1+6
5. If sum is a multiple of 10, then the card number is valid
-}
#!/bin/bash
if [[ ! -e ~/.vim/bundle/Vundle.vim/.git ]]
then
rm -rf ~/.vim/bundle/Vundle.vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
rm -f ~/.vimrc
rm -rf ~/vim_temp