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
@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"
@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
@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
@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
@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'
@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
@andreicek
andreicek / yubikey.md
Created January 17, 2018 20:35
Markdown my talk about GPG and Yubikey

Security with

[fit] Yubikey and GPG

--

@andreicek


@magnetikonline
magnetikonline / README.md
Last active March 30, 2024 06:24
CloudFormation API Gateway endpoint calling a Lambda function using proxy integration example.

CloudFormation API Gateway integration to Lambda function

Template that will create the following:

  • API Gateway:
    • Deployed as a REGIONAL endpoint.
    • Single root method, accepting POST requests only, with Lambda proxy integration to a target function.
  • In-line Python Lambda function echoing back requesting users IP address to API Gateway requests:
    • IAM role for Lambda allowing CloudWatch logs access.
    • Permissions for Lambda that allow API Gateway endpoint to successfully invoke function.
@marc-fez
marc-fez / dell-XPS-15-arch-linux-install
Last active January 7, 2023 22:56 — forked from mattiaslundberg/arch-linux-install
Instructions for installing arch linux on a Dell XPS 15 with full system encryption using dm-crypt and luks
# Having problems with the nvidia drivers
# Arch wiki page on XPS 15
# https://wiki.archlinux.org/index.php/Dell_XPS_15_9560
# Install ARCH Linux with encrypted file-system and UEFI on Dell XPS 15
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
@CarlosDomingues
CarlosDomingues / python-poetry-cheatsheet.md
Last active May 19, 2024 05:20
Python Poetry Cheatsheet

Create a new project

poetry new <project-name>

Add a new lib

poetry add <library>

Remove a lib