This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#define WM_LOGONNOTIFY 0x004c | |
#define LN_UNLOCK_WORKSTATION 0x0006 | |
void showError() | |
{ | |
LPTSTR pBuf; | |
DWORD nBytes = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, | |
NULL, GetLastError(), LANG_USER_DEFAULT, (LPWSTR)&pBuf, 4096, NULL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if 0 | |
pkg = glib-2.0 gio-2.0 | |
src = $(MAKEFILE_LIST) | |
app = $(basename $(src)) | |
CFLAGS = $(shell pkg-config --cflags $(pkg)) -x c | |
LDFLAGS = $(shell pkg-config --libs $(pkg)) | |
$(app): $(src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use Net::DBus; | |
use Net::DBus::Reactor; | |
use POSIX; | |
my $inhibit_fd; | |
my $logind_mgr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if 0 | |
pkg = libpulse | |
src = $(MAKEFILE_LIST) | |
app = $(basename $(src)) | |
CFLAGS = $(shell pkg-config --cflags $(pkg)) -x c | |
LDFLAGS = $(shell pkg-config --libs $(pkg)) | |
$(app): $(src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <X11/Xlib.h> | |
#include <X11/Xatom.h> | |
#include <err.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int get_prop_card32(Display *d, Window w, Atom p) { | |
Atom actual_type; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if 0 | |
src = $(MAKEFILE_LIST) | |
app = $(basename $(src)) | |
$(app): LDLIBS = -lX11 -lXi | |
$(app): $(src) | |
define source | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- /etc/dbus-1/system.d/hidepid.conf --> | |
<!-- This prevents users from bypassing /proc hidepid= restrictions using 'systemctl status'. --> | |
<busconfig> | |
<!-- Allow root to use systemctl --> | |
<policy user="root"> | |
<allow send_destination="org.freedesktop.systemd1" | |
send_interface="org.freedesktop.systemd1.Manager" | |
send_member="GetUnitProcesses"/> | |
</policy> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dns.rdtypes.ANY.TKEY | |
import dns.resolver | |
import dns.update | |
import gssapi | |
import socket | |
import time | |
import uuid | |
def _build_tkey_query(token, key_ring, key_name): | |
inception_time = int(time.time()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import bs4 | |
import os | |
import requests | |
import subprocess | |
import sys | |
def validate_xml_file(path, schema): | |
r = subprocess.call(["xmllint", "--noout", "--schema", schema, path]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE | |
# | |
# Eduroam settings are organization-specific. | |
# | |
# If something works with *@foobar.edu, that _does_not_mean_ the same | |
# settings automatically work elsewhere. | |
# | |
# Fortunately, *most* sites use very similar settings – password logins via | |
# PEAP or TTLS. That's what this example covers. | |
# |
OlderNewer