Skip to content

Instantly share code, notes, and snippets.

@jvsg
jvsg / gist:c9a4fe086250212f8fd3df01c52cd643
Created August 13, 2022 18:00
Qemu aarch64 for freeBSD on darwin host.
qemu-system-aarch64 \
-cpu cortex-a72 \
-M virt,highmem=off \
-m 512 \
-drive file=freebsd.qcow2 \
-bios QEMU_EFI.fd \
-device intel-hda \
-device qemu-xhci \
-device ramfb \
-display default,show-cursor=on \
#!/bin/sh
#
# Copyright IBM, Corp. 2010
#
# Authors:
# Anthony Liguori <aliguori@us.ibm.com>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
#!/usr/bin/python
def login():
import requests
session = requests.session()
request = session.get('http://google.com')
user = raw_input("Username: ")
passwd = raw_input("Password: ")
data = dict(username=user,password=passwd,magic=request.url[39:])
if 'IIIT-D' in str(request.content):
@jvsg
jvsg / simple_deadlock.cpp
Created December 26, 2016 20:50
Very simple demonstration of deadlock
#include <iostream>
#include <thread>
#include <mutex>
using namespace std;
mutex m1;
mutex m2;
void hello()
{