Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@w1k1n9cc
w1k1n9cc / vagrant-qubes.md
Created August 10, 2018 16:29 — forked from xahare/vagrant-qubes.md
Vagrant on Qubes-OS

Vagrant on Qubes-OS

(Vagrant)[https://www.vagrantup.com] "Development Environments Made Easy"

(Qubes-OS)[https://www.qubes-os.org] "A Reasonably Secure Operating System."

This is a guide on to using vagrant on qubes-os with qemu using the libvirt provider. Because qubes-os does not support nested virtualization, you'r stuck with emulation. If you want performance, use a system with a proper vagrant setup.

Template Setup

@w1k1n9cc
w1k1n9cc / qvm-portfwd-socat
Created May 31, 2018 15:22 — forked from Joeviocoe/qvm-portfwd-socat
Qubes-OS socket connection to allow external connections
#!/bin/bash
NetVM=$1
TargetVM=$2
Service=$3
TCP_Port=$4
wasrunning=$(qvm-ls | grep $TargetVM | grep -i RUNNING)
echo -ne "TCP socket connection for $Service from $NetVM to $TargetVM on port $TCP_Port...\nPress Any Key to End\n\n"
trap cleanup 1 2 3 6 15
@w1k1n9cc
w1k1n9cc / qvm-portfwd-iptables
Created May 31, 2018 15:21 — forked from Joeviocoe/qvm-portfwd-iptables
Qubes-os port forwarding to allow external connections
#!/bin/sh
# Inspired by https://gist.github.com/daktak/f887352d564b54f9e529404cc0eb60d5
# Inspired by https://gist.github.com/jpouellet/d8cd0eb8589a5b9bf0c53a28fc530369
ip() { qvm-prefs -g -- "$1" ip; }
netvm() { qvm-prefs -g -- "$1" netvm; }
forward() {
local from_domain=$1
local to_domain=$2
@w1k1n9cc
w1k1n9cc / waya-dl-setup.sh
Created August 24, 2017 10:01 — forked from mjdietzx/waya-dl-setup.sh
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@w1k1n9cc
w1k1n9cc / ssid-sniffer-scapy-python.py
Created April 13, 2017 09:53 — forked from securitytube/ssid-sniffer-scapy-python.py
WLAN SSID Sniffer in Python using Scapy
#!/usr/bin/env python
from scapy.all import *
ap_list = []
def PacketHandler(pkt) :
if pkt.haslayer(Dot11) :
if pkt.type == 0 and pkt.subtype == 8 :
@w1k1n9cc
w1k1n9cc / Installation.sh
Created January 22, 2017 19:15 — forked from cardil/Installation.sh
Linux NVidia Optimus with external monitor - enable/disable scripts tested on Ubuntu. Source article: http://www.unixreich.com/blog/2013/linux-nvidia-optimus-on-thinkpad-w520w530-with-external-monitor-finally-solved
# You will need latest NVIDIA drivers installed. At the time of writing, version is 331.20.
# On ubuntu 13.10, it looks like this:
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-331
# Now we need to install bumblebee:
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get install bumblebee bumblebee-nvidia bbswitch-dkms
@w1k1n9cc
w1k1n9cc / check-use
Created August 15, 2016 19:08 — forked from garymacindoe/check-use
Checks for invalid/obsolete entries in Gentoo Portage's package.use files
#!/bin/bash
#
# Author: Gary Macindoe
# Date: May 2013
files="/etc/portage/package.use"
if [ -d "${files}" ]
then
files="${files}/*"
fi
@w1k1n9cc
w1k1n9cc / microtime.c
Created June 7, 2016 15:48
Get the current time in microseconds in C.
#include <sys/time.h>
/**
* Returns the current time in microseconds.
*/
long getMicrotime(){
struct timeval currentTime;
gettimeofday(&currentTime, NULL);
return currentTime.tv_sec * (int)1e6 + currentTime.tv_usec;
}
@w1k1n9cc
w1k1n9cc / tmux-cheatsheet.markdown
Created March 23, 2016 18:42 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname