$ mkdir /media/spotdlsync
$ cd /media/spotdlsync
$ mkdir "Life is Strange"
$ cd "Life is Strange"
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
# Replace "192.168.2.{}" as per your gateway address. | |
seq 1 254 | xargs -I {} "echo" "192.168.2.{}" | parallel -j 254 "ping -t 1 -c 1 {} > /dev/null && (timeout 1 avahi-resolve -a {} || echo {})" 2> /dev/null |
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
# pip install pytube3 | |
import pytube | |
import urllib.request | |
import subprocess | |
content = pytube.YouTube("https://www.youtube.com/watch?v=YQHsXMglC9A") | |
streams = content.streams.filter(only_audio=True).order_by("abr").desc() | |
response = urllib.request.urlopen(streams[0].url) |
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
# Increase tempo (x1.06) and frequency (x1.25 assuming input freq. = 44100 Hz) | |
ffmpeg -i input.mp3 -filter:a "atempo=1.06,asetrate=44100*1.25" output.mp3 | |
# Without tempo | |
ffmpeg -i input.mp3 -filter:a "asetrate=44100*1.25" output.mp3 | |
# Create one frame .mp4 from .mp3 + .jpg | |
ffmpeg -i output.mp3 -i anime.jpg output.mp4 | |
# Do above in single command | |
ffmpeg -i input.mp3 -i anime.jpg -filter:a "atempo=1.06,asetrate=44100*1.25" -vn output.mp4 |
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
# Generate SSH keys for Bob and add them to ssh-agent | |
# Write it to `~/.ssh/bob.id_rsa`. | |
ssh-keygen -t ed25519 | |
ssh-add ~/.ssh/bob.id_rsa | |
git config --local user.name Bob | |
git config --local user.email "bobisthebest@example.com" | |
git config --local credential.username bobxyz | |
git config --replace-all --local core.sshCommand "ssh -i ~/.ssh/bob.id_rsa" |
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
# Copyright (c) 1993-2009 Microsoft Corp. | |
# | |
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows. | |
# | |
# This file contains the mappings of IP addresses to host names. Each | |
# entry should be kept on an individual line. The IP address should | |
# be placed in the first column followed by the corresponding host name. | |
# The IP address and the host name should be separated by at least one | |
# space. | |
# |
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
import pygame | |
import random | |
width, height = (450, 600) | |
background_color = (10,10,10) | |
clock = pygame.time.Clock() | |
screen = pygame.display.set_mode((width, height)) | |
pygame.display.set_caption("Falling Blocks") | |
pygame.display.flip() |
I hereby claim:
- I am ritiek on github.
- I am ritiek (https://keybase.io/ritiek) on keybase.
- I have a public key ASA1qFuAESdfigezYxV8q4XPEY6hqSk8UHvogWNRJCsKJwo
To claim this, I am signing this object:
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 logging | |
import urllib2 as urllib | |
import nmap | |
logging.getLogger("scapy.runtime").setLevel(logging.ERROR) | |
from scapy.all import * | |
def scanNetwork(network): |
NewerOlder