Skip to content

Instantly share code, notes, and snippets.

View stiliajohny's full-sized avatar
🦜
Catching Parrots

John Stilia stiliajohny

🦜
Catching Parrots
View GitHub Profile
@samukasmk
samukasmk / torrent-client-by-url.py
Last active June 19, 2023 12:26
Script of example to download files by torrent in Python (By: magnet url)
# source:
# https://stackoverflow.com/questions/6051877/loading-magnet-link-using-rasterbar-libtorrent-in-python
#
# ATTENTION: This is only a example of to use a python bind of torrent library in Python for educational purposes.
# I am not responsible for your download of illegal content or without permission.
# Please respect the laws license permits of your country.
import libtorrent as lt
import time
@itarato
itarato / ttymindmap.rb
Created March 7, 2017 04:18
Command line mindmap app
# Usage:
# - Start new mindmap:
# `ruby ttymindmap.rb`
# - Open Freemind format MM mindmap:
# `ruby ttymindmap.rb <PATH-TO-MM-FILE>`
#
# Press `h` key when running for help.
require 'nokogiri'
@awesomebytes
awesomebytes / ipython_to_file.md
Created March 16, 2016 10:38
Save iPython session to a python file as code

Save an iPython session commands/code to a file

You must use the magic method %save:

In [1]: %save?
Type:       Magic function
String Form:<bound method CodeMagics.save of <IPython.core.magics.code.CodeMagics object at 0x7fb5d25bb1d0>>
Namespace:  IPython internal
File: /usr/lib/python2.7/dist-packages/IPython/core/magics/code.py
@kesonno
kesonno / Vagrantfile.rb
Created February 26, 2016 09:50
Ask for user input in Vagrantfile during provisioning phase
if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/#{VM_NAME}/*").empty? || ARGV[1] == '--provision'
print "Please insert your credentials\n"
print "Username: "
username = STDIN.gets.chomp
print "Password: "
password = STDIN.noecho(&:gets).chomp
print "\n"
config.vm.provision :shell, :path => "provision-vagrant.sh", :args => [username, password]
end
@chmodx
chmodx / dockerGUI
Last active September 12, 2023 08:51
Using GUI's with Docker
docker pull kalilinux/kali-linux-docker
# Available metapackages for Kali Linux (apt-get update && apt-cache search kali-linux)
# To see the list of tools included in a metapackage (apt-cache show kali-linux-web |grep Depends)
xhost +local:`docker inspect --format='{{ .Config.Hostname }}' $containerId`
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/bauta/Downloads:/bt kalilinux maltego
@alisonailea
alisonailea / AwakenSpotify.scpt
Last active December 8, 2023 22:05
AppleScript to automate the Spotify playlist launch based on the time of day
--current time in seconds since midnight
set currentTime to (time of (current date))
## Morning
-- (04:00 - 10:30)
set morning to 37800
set morningVolume to 80
-- Happy: Wake Up in a Good Mood
set morningTrack to "spotify:user:116779154:playlist:5sYrf2RnhPY22meUSS5fUu"