Skip to content

Instantly share code, notes, and snippets.

View curioswati's full-sized avatar
💻

Swati Jaiswal curioswati

💻
View GitHub Profile
@curioswati
curioswati / flatpak-dmenu.md
Last active March 12, 2024 13:24
To run flatpak installed apps from dmenu.

To run a flatpak app from dmenu, you can create a symlink for the app in /usr/bin. You can find the flatpak apps binary link in /var/lib/flatpak/exports/bin/ on ubuntu. E.g. to run Rocket Chat (installed from flatpak via software center), you can do something like this:

sudo ln -s /var/lib/flatpak/exports/bin/chat.rocket.RocketChat /usr/bin/rocket-chat

This way you will be able to find it in the dmenu.

Resources:

@curioswati
curioswati / install_apache_open_office.py
Created July 25, 2017 05:27 — forked from curioswati-zz/install_apache_open_office.py
Installer script for Apache open office 4.0 or 4.1 on ubuntu 14.04
#!/usr/bin/env python
import subprocess
import optparse
import platform
#--------------------------------------------Globals-------------------------------------------------------------
install = []
uninstall = ["sudo apt-get purge openoffice*.* && sudo apt-get autoremove"]
PLATFORM = platform.system()
ARCHITECTURE = platform.architecture()[0]
@curioswati
curioswati / install_anaconda.py
Created July 25, 2017 05:24 — forked from curioswati-zz/install_anaconda.py
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]
@curioswati
curioswati / install_jekyll.py
Last active December 22, 2020 13:00 — forked from curioswati-zz/install_jekyll.py
Installer script for Jekyll 2 with Ruby 2.2 on ubuntu 18.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
curioswati / install_virtual_box.py
Created July 25, 2017 05:24 — forked from curioswati-zz/install_virtual_box.py
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
curioswati / install_nodejs_0_12_x.sh
Created July 25, 2017 05:23 — forked from curioswati-zz/install_nodejs_0_12_x.sh
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
curioswati / replace_text.py
Created July 25, 2017 05:22 — forked from curioswati-zz/replace_text.py
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
curioswati / docker_playbook.py
Created July 25, 2017 05:21 — forked from curioswati-zz/docker_playbook.py
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
curioswati / install_ansible.py
Created July 25, 2017 05:21 — forked from curioswati-zz/install_ansible.py
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
curioswati / .vimrc
Last active June 28, 2019 09:32 — forked from curioswati-zz/.vimrc
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