Skip to content

Instantly share code, notes, and snippets.

@wellington1993
wellington1993 / domain.xml
Created September 27, 2019 00:17 — forked from Informatic/domain.xml
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
@lloeki
lloeki / git_merge_repos.sh
Last active October 23, 2020 02:21
Merge repos and keep whole history by creating a single multi-parent merge commit
#!/bin/bash
set -e
set -u
set -o pipefail
prefix="[email protected]:mygroup"
target="$1"
shift
@poundbangbash
poundbangbash / com.microsoft.office.mobileconfig
Last active March 6, 2018 09:08
com.microsoft.office preference management mobileconfig for Office 15.33+
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.microsoft.office</key>
anonymous
anonymous / inject.js
Created April 19, 2015 19:39
Hacker Experience Crappy "Cheat" script. [ Chrome extension ] You also need to download jquery and localStoragedb and place it in the same directory. (And probably rename it to fit the manifest.json)
var TITLE = "HE Script 0.4"
var DEFAULT_LOCAL_TAG = "This log is monitored by "+TITLE +" - you cant delete faster than i log ..."
var LOGGER_TIMEOUT = 2000;
var GREEN = "#76A346";
var RED = "#A34646";
var BLUE = "#4679A3";
var ORANGE = "#A39146";
var ip;
from __future__ import unicode_literals, division, absolute_import
import os
import re
import logging
from flexget import plugin
from flexget.event import event
from flexget.utils.template import RenderError

Experimental Generation of Interpersonal Closeness

Instructions to Subjects Included With Task Slips Packet

This is a study of interpersonal closeness, and your task, which we think will be quite enjoyable, is simply to get close to your partner. We believe that the best way for you to get close to your partner is for you to share with them and for them to share with you. Of course, when we advise you about getting close to your partner, we are giving advice regarding your behavior in this demonstration only, we are not advising you about your behavior outside of this demonstration.

In order to help you get close we've arranged for the two of you to engage in a kind of sharing game. You're sharing time will be for about one hour, after which time we ask you to fill out a questionnaire concerning your experience of getting close to your partner.

You have been given three sets of slips. Each slip has a question or a task written on it. As soon as you both finish reading these instructions, you should

@matsimon
matsimon / ad_authorized_keys.sh
Last active February 26, 2021 20:34
Script used by 'AuthorizedKeysCommand' to retrieve SSH keys in an Active Directory (OpenSSH >= 6.2)
#!/bin/bash
username=`echo $1`
# AD needs authenticated binds, it's an unprivileged user
# use the UPN to write little less
ldapsearch \
-o ldif-wrap=no \
-D "srv-sshkeylookup@mydomain" \
-w "PlaintextPassword" \
@denji
denji / nginx-tuning.md
Last active April 21, 2025 11:07
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@cobyism
cobyism / osx-install-media.md
Last active March 11, 2023 00:42
Command to create installable OS X USB drive.

Creating a bootable macOS USB installer

  • First, plug in an 8GB (or bigger) USB drive, and use Disk Utility to erase it
  • If you use the default settings, you should wind up with a blank drive at /Volumes/Untitled.

With that volume in place, and with the macOS installer sitting in /Applications/Install\ macOS\ [VERSION].app, run the following command in your terminal to create a bootable install media (for Sierra):

sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction