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 bash | |
# Create a temporary directory for screenshots | |
tmpdir=$(mktemp -d) | |
# Get the list of active outputs | |
outputs=$(swaymsg -t get_outputs | jq -r '.[] | select(.active) | .name') | |
initial_focus=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') |
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
def selfdec(f): | |
def dec(*x, **kwa): | |
f.__globals__['self'] = x[0] | |
return f(*x[1:], **kwa) | |
return dec | |
class X(): | |
@selfdec | |
def z(more, args, even="opt"): | |
self.hurr = 3 |
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/python | |
# -*- coding: utf-8 -*- | |
""" | |
Virt management features | |
Copyright 2007, 2012 Red Hat, Inc | |
Michael DeHaan <[email protected]> | |
Seth Vidal <[email protected]> |
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/python | |
# This file is part of Ansible | |
# | |
# Ansible is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# Ansible is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
#!/bin/bash | |
set -e | |
VERSION=$1 | |
INSTALLER="OCTGN-Setup-${VERSION}.exe" | |
echo $VERSION $INSTALLER |
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/rdmd | |
import std.stdio; | |
int sub(int x, int y) { | |
return x - y; | |
} | |
void main() { | |
int init = 0; |
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 os | |
def evalexit(code): | |
eval(code) | |
raise SystemExit | |
def forkexpr(s): | |
code = compile(s, "<string>", "eval") | |
os.fork() or evalexit(code) |
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 <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
#define CHAR_BIT 8 | |
#define MAXBITS (CHAR_BIT*sizeof(uintmax_t)) | |
#define FMT_BUF_SIZE (MAXBITS+1) | |
char *binary_fmt(uintmax_t x, char buf[static FMT_BUF_SIZE]) | |
{ |
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/python2 | |
import multiprocessing | |
import socket | |
import time | |
import os | |
def handle(socket): | |
import logging | |
logging.basicConfig(level=logging.DEBUG) |