Skip to content

Instantly share code, notes, and snippets.

View curioswati-zz's full-sized avatar

Swati Jaiswal curioswati-zz

View GitHub Profile
@curioswati-zz
curioswati-zz / i3status.config
Last active July 25, 2017 05:19
i3status config file
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
@curioswati-zz
curioswati-zz / i3.config
Last active July 25, 2017 05:19
i3wm config file.
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#
@curioswati-zz
curioswati-zz / .vimrc
Last active July 25, 2017 05:21
My vimrc
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2011 Apr 15
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
@curioswati-zz
curioswati-zz / install_ansible.py
Created September 8, 2016 17:48
A python script to install Ansible from source on a Debian based operating system.
#!/usr/bin/env python
import subprocess
import optparse
import platform
# -------------------------------------Globals------------------------------------------------------
install = []
uninstall = ["sudo pip uninstall ansible", "sudo apt-get purge libffi-dev libssl-dev"]
PLATFORM = platform.system()
ARCHITECTURE = platform.architecture()[0]
@curioswati-zz
curioswati-zz / docker_playbook.py
Created June 13, 2016 17:01
A python script to create an Ansible playbook to install and run a docker container.
from collections import namedtuple
from ansible.parsing.dataloader import DataLoader
from ansible.vars import VariableManager
from ansible.inventory import Inventory
from ansible.playbook.play import Play
from ansible.executor.task_queue_manager import TaskQueueManager
# set options for play
Options = namedtuple('Options', ['connection', 'module_path', 'forks',
'become', 'become_method', 'become_user', 'check'])
@curioswati-zz
curioswati-zz / replace_text.py
Created March 6, 2016 14:56
Python script for text replacement in all files of current directory.
import os
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''This script will modify all the files in the current directory.
It works recursively on all subdirectories.
It will insert the input string on a required place as mentioned with respect to
some text.
There are two user inputs, first is the text after which to append and
second is the text to append''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
replace_text = raw_input("Enter the text after which you want to append : ")
@curioswati-zz
curioswati-zz / install_nodejs_0_12_x.sh
Created October 29, 2015 16:15
Install script for nodejs 0.12.x from debsources. The number at last can be replaced to any valid version number of node to install different versions e.g. 0.10, 4.x etc.
sudo apt-get install -y curl
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get install -y nodejs
@curioswati-zz
curioswati-zz / install_virtual_box.py
Last active July 25, 2017 05:24
Installer script for virtual box in ubuntu 14.04, 14.10, 12.04
#!/usr/bin/env python
import subprocess
import optparse
import platform
install = []
uninstall = ["sudo apt-get purge virtualbox*"]
PLATFORM = platform.system()
DIST_VERSION = platform.dist()[1]
ARCHITECTURE = platform.architecture()[0]
@curioswati-zz
curioswati-zz / install_jekyll.py
Last active July 25, 2017 05:24
Installer script for Jekyll 2 with Ruby 2.2 on ubuntu 14.04
#!/usr/bin/env python
import subprocess
import optparse
import platform
#-------------------------------------Globals--------------------------------------------------------
install = []
uninstall = ["sudo apt-get remove ruby* ruby*-dev rubygems"]
PLATFORM = platform.system()
ARCHITECTURE = platform.architecture()[0]
@curioswati-zz
curioswati-zz / install_anaconda.py
Last active September 11, 2017 00:00
Installer script for Anaconda in ubuntu 14.04
#!/usr/bin/env python
import subprocess
import optparse
import platform
#---------------------------------------Globals----------------------------------------------------
install = []
PLATFORM = platform.system()
ARCHITECTURE = platform.architecture()[0]