Skip to content

Instantly share code, notes, and snippets.

@syshack
syshack / rsync-retry.sh
Created May 30, 2019 05:31 — forked from iangreenleaf/rsync-retry.sh
rsync with retries
#!/bin/bash
### ABOUT
### Runs rsync, retrying on errors up to a maximum number of tries.
### Simply edit the rsync line in the script to whatever parameters you need.
# Trap interrupts and exit instead of continuing the loop
trap "echo Exited!; exit;" SIGINT SIGTERM
MAX_RETRIES=50
###################### Filebeat Configuration Example #########################
# This file is an example configuration file highlighting only the most common
# options. The filebeat.full.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/filebeat/index.html
#=========================== Filebeat prospectors =============================
@syshack
syshack / readme.md
Created August 28, 2017 03:33 — forked from Keenuts/readme.md
GSoC 2017 | Virgl Windows Driver

GSOC 2017 | Virgl Windows Driver

Project repositories

The project is split into several parts:

  • The kernel driver, with simple 3D command forwarding and 3D resource allocation
  • The userland driver, in fact the OpenGL backend
  • The reference, explaining virtio-gpu commands

https://github.com/Keenuts/virtio-gpu-win-icd \

@syshack
syshack / iomoniter.stp
Created July 6, 2016 06:16
全系统IO监控
global file_read_top
global file_write_top
probe begin {
printf("Ctrl-C break\n")
}
probe syscall.read.return {
if ( $return > 0 ) {
file = @cast(task_current(), "task_struct")->files->fdt->fd[$fd]
@syshack
syshack / ioperproc.stp
Created July 6, 2016 06:06
进程IO监控
global file_rw_top
global exe
probe begin {
printf("Ctrl-C break\n")
}
function rwtrace(pid, fd, size, type) {
if ( size > 0 ) {
if ( pid() == $1 ) {

KVM OSX Guest 10.11 (El Capitan) with Clover

  • Some notes about this approach:
    • An OSX Installer USB drive for Install OS X El Capitan is created
    • Clover is then installed on the USB drive
    • Clover Configurator is then run on the USB drive
    • The USB drive contents are copied to the VM host
    • VNC is used to connect to the guest UI
  • The qxl virtual video device is used (part of the standard kvm qemu install)
/*
* smc_read.c: Written for Mac OS X 10.5. Compile as follows:
*
* gcc -Wall -o smc_read smc_read.c -framework IOKit
*/
#include <stdio.h>
#include <IOKit/IOKitLib.h>
typedef struct {
@syshack
syshack / gist:098056a63c95d0a58e1b
Created March 21, 2016 11:25
chanegadpasswd.py
#!/usr/bin/env python
# coding=utf-8
import ldap
server = 'ldaps://ad.xxx.com'
l = ldap.initialize(server,trace_level=2)
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
dn = "[email protected]"
pw = "xxxxxxxxxx"
l.bind_s(dn,pw)
package dcec.rdd;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URLEncoder;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
<!DOCTYPE html>
<html>
<head>
<title>MyHtml.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->