Skip to content

Instantly share code, notes, and snippets.

View yolossn's full-sized avatar

S Santhosh Nagaraj yolossn

View GitHub Profile
@fedterzi
fedterzi / update_godaddy.py
Last active April 2, 2022 16:14
Python script to update a DNS record with GoDaddy API
#!/usr/bin/env python
# Import pif to get your public ip, sys and os.path
import pif, sys, os.path
# Partial imports
from godaddypy import Client, Account
# Remember to set your api key and secret
userAccount = Account(api_key='api_key', api_secret='api_secret')
@christopherlovell
christopherlovell / display.py
Last active November 18, 2023 22:22
display youtube video in jupyter notebook
from IPython.display import HTML
# Youtube
HTML('<iframe width="560" height="315" src="https://www.youtube.com/embed/S_f2qV2_U00?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>')
# Vimeo
HTML('<iframe src="https://player.vimeo.com/video/26763844?title=0&byline=0&portrait=0" width="700" height="394" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe><p><a href="https://vimeo.com/26763844">BAXTER DURY - CLAIRE (Dir Cut)</a> from <a href="https://vimeo.com/dannysangra">Danny Sangra</a> on <a href="https://vimeo.com">Vimeo</a>.</p>')

Exercises for Bash Beginner's Guide

Chapter 1

1. Where is the bash program located on your system?

A: In /bin/bash

2. Use the --version command to find out which version you are running.

@kylemclaren
kylemclaren / findLongRunningOp.js
Last active September 24, 2024 12:05 — forked from comerford/killLongRunningOps.js
Find and (safely) kill long running MongoDB ops
db.currentOp().inprog.forEach(
function(op) {
if(op.secs_running > 5) printjson(op);
}
)
@mchirico
mchirico / bashFor.go
Last active October 29, 2023 04:14
Go (golang) program to execute a bash for loop.
package main
import (
"bytes"
"fmt"
"log"
"os/exec"
"strings"
)