This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This bash script copies a file from a specified file path | |
# and places it in the same path on each of the specified hosts | |
# The script requires at least 3 arguments : | |
# - Filepath | |
# - Filename | |
# - Host(s) to copy the file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script triggers Jenkins builds remotely | |
# provided you have the necessary configurations set on | |
# your Jenkins node | |
# This script takes in 3 variables (Jenkins URL, User's name and API Key), | |
# 2 arguments (job-name, authentication token) | |
# and assumes that you don't have to build with parameters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# This script traverses over the fields in a model | |
# of a rails application to map them to | |
# the corresponding schema type in Postgres. | |
# The output generated is in YAML format | |
# and can be used as the collection map for MoSQL. | |
puts "#{Mongoid.default_session.options[:database]}:" # Print the database the application is connected to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script calculates the duration between | |
# 2 epoch timestamps passed as arguments to it | |
# This script accepts only epoch timestamps | |
# because only the epoch timestamps are complete. | |
# Other timestamps may cause confusions. | |
# However, support for formats supported by `date' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name _; | |
location = /status { | |
stub_status; | |
access_log off; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
from datetime import date | |
import json | |
try: | |
from urllib.request import urlopen | |
except ImportError: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env awk | |
# not really necessary, but here for completness | |
# BEGIN { | |
# mem = 0; | |
# swap = 0; | |
# } | |
NR == 2 { mem = $4; } | |
NR == 3 { swap = $3; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from sys import argv, exit # pylint: disable=redefined-builtin | |
from telethon.sync import TelegramClient | |
from telethon.utils import get_display_name | |
from telethon.tl.types import User | |
from telethon.tl.functions.messages import GetDialogFiltersRequest | |
# Telegram API Credentials | |
config = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
"basics": { | |
"name": "Shine Nelson", | |
"label": "System Administrator / IT Consultant", | |
"image": "https://www.gravatar.com/avatar/388f1f06508faa9283639fc333bf9857?size=256", | |
"email": "[email protected]", | |
"url": "https://shinenelson.in", | |
"summary": "Shine enjoys experimenting with technology and building new technology for the betterment of humanity. His interest in technology piqued as a eighth grader from reading technology magazines his father would bring from work. He set his ambition to pursue Computer Science & Engineering. During his under-graduation course, he was introduced to GNU/Linux and subsequently Free, Libre and Open Source Software (FLOSS) which changed his life to a whole new world of experimentation and fun. Since then, he has never stopped compiling open source software and experimenting with new technology in general. He would categorize among the early |