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
extern crate xml; | |
use std::path::Path; | |
use std::fs::File; | |
use xml::reader::EventReader; | |
use xml::reader::events::*; | |
#[derive(Clone)] | |
struct GlyphGeometry { | |
pub rect: Rect, |
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
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; coding: utf-8; -*- | |
from ctypes import * | |
user32 = WinDLL('User32') | |
DISPLAY_ON = -1 | |
DISPLAY_OFF = 2 | |
HWND_BROADCAST = 0xffff | |
WM_SYSCOMMAND = 0x0112 | |
SC_MONITORPOWER = 0xf170 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 python | |
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; coding: utf-8; -*- | |
import sys | |
import ctypes | |
from pathlib import Path | |
from contextlib import suppress | |
# https://msdn.microsoft.com/ja-jp/library/windows/desktop/gg258117%28v=vs.85%29.aspx |
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 python | |
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; coding: utf-8; -*- | |
import inspect | |
from functools import wraps | |
class AnnotationValidateError(Exception): | |
pass |
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
-- -*- Mode: lua; tab-width: 2; lua-indent-level: 2; indent-tabs-mode: nil; -*- | |
local loader = {} | |
local package = require "package" | |
loader.last_err = false | |
loader.last_err_msg = nil | |
function loader.load(module) | |
return require(module) |
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 python | |
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; coding: utf-8; -*- | |
import sys | |
import subprocess | |
from operator import itemgetter | |
def show_swapped_processes(): | |
p = subprocess.Popen('grep VmSwap /proc/*/status', |
NewerOlder