Skip to content

Instantly share code, notes, and snippets.

View ultimatecoder's full-sized avatar
🎯
Focusing

Jaysinh Shukla ultimatecoder

🎯
Focusing
View GitHub Profile
Feature: Cucumber
Scenario: First run
When I run `python_program.py` interactively
And I type "1"
And I type "2"
Then the output should contain "3"
[setup]
stdin = <<EOF
1
2
EOF
[act]
./python_program.py
@ultimatecoder
ultimatecoder / garud.sh
Last active April 26, 2019 14:16
A test runner for Expact (https://core.tcl.tk/expect/index) based test cases. This runner detects expect tests and run them one by one.
#! /bin/sh
# Installation
# ---------------
#
# Step-1 : Create directory
# mkdir ~/garud
#
# Step-2 : Download the garud.sh script
# wget https://gist.githubusercontent.com/ultimatecoder/801177083c722884d8e6ff76bb342c8d/raw/9236f8e8354ef324c10a19c372d21b8f05431a58/garud.sh -O ~/garud/garud
@ultimatecoder
ultimatecoder / asana_tasks_to_github_issues.py
Created January 8, 2019 17:09
Adding a script to create individual Github issues for each Asana tasks. Dependencies are Python 2.7 runtime, asana (https://pypi.org/project/asana/) and PyGithub (https://pypi.org/project/PyGithub/).
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Automated script to create Asana tasks to Github issues
Python version:
2.7
Build:
Installing Python packages:
pip install asana PyGithub
@ultimatecoder
ultimatecoder / securedrop-admin.log
Created November 25, 2018 00:02
Log of running `securedrop-admin install` command second time after installation
mnesia@amnesia:~/Persistent/securedrop$ ./securedrop-admin install
INFO: Now installing SecureDrop on remote servers.
INFO: You will be prompted for the sudo password on the servers.
INFO: The sudo password is only necessary during initial installation.
SUDO password:
[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use 'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions. This feature will be removed in a future release.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.. This feature will be removed in a
future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: default callback, does not support setting 'options', it will work for now, but this will be required in the future
@ultimatecoder
ultimatecoder / mailer.py
Last active October 12, 2018 14:01
A Python script to send emails
#! /usr/bin/python
import argparse
import logging
import os
import smtplib
import sys
VirtualBox VM 5.1.36_Gentoo r122089 linux.amd64 (Jun 13 2018 11:25:49) release log
00:00:00.027378 Log opened 2018-08-03T08:22:21.603881000Z
00:00:00.027379 Build Type: debug
00:00:00.027382 OS Product: Linux
00:00:00.027384 OS Release: 4.9.76-gentoo-r1
00:00:00.027385 OS Version: #13 SMP Mon Apr 2 18:06:03 IST 2018
00:00:00.027405 DMI Product Name: SVE15126CVB
00:00:00.027412 DMI Product Version: C904AEMC
00:00:00.027455 Host RAM: 7934MB (7.7GB) total, 6144MB (6.0GB) available
00:00:00.027459 Executable: /usr/lib64/virtualbox/VBoxHeadless
This file has been truncated, but you can view the full file.
 * package: app-emulation/virtualbox-5.2.14-r1
 * repository: gentoo
 * maintainer: polynomial-c@gentoo.org
 * use: abi_x86_64 alsa amd64 debug doc elibc_glibc java kernel_linux opengl pam pax_kernel python python_targets_python2_7 qt5 sdk udev userland_gnu
 * features: preserve-libs sandbox userpriv usersandbox
* using: icedtea-bin-8
>>> unpacking source...
>>> unpacking virtualbox-5.2.14.tar.bz2 to /var/tmp/portage/app-emulation/virtualbox-5.2.14-r1/work
>>> unpacking virtualbox-5.2.12-patches-01.tar.xz to /var/tmp/portage/app-emulation/virtualbox-5.2.14-r1/work
>>> source unpacked in /var/tmp/portage/app-emulation/virtualbox-5.2.14-r1/work
set incsearch
set autoindent
set backup
set ruler
set showcmd
@ultimatecoder
ultimatecoder / vagrant_up_debug
Created June 15, 2018 10:57
Gentoo Debug output
INFO global: Vagrant version: 2.1.1
INFO global: Ruby version: 2.3.7
INFO global: RubyGems version: 2.7.6
INFO global: VAGRANT_DETECTED_OS="Linux"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/var/lib/vagrant"
INFO global: VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT="1"
INFO global: VAGRANT_EXECUTABLE="/usr/lib64/ruby/gems/2.3.0/gems/vagrant-2.1.1/bin/vagrant"
INFO global: VAGRANT_LOG="debug"