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 <memory> | |
#include <list> | |
#include <string> | |
#include <stdexcept> | |
#include <iostream> | |
class Node : public std::enable_shared_from_this<Node> | |
{ | |
private: | |
const Node *m_parent; ///< Read-only reference to parent node, modified only on node insert or release |
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 | |
# -*- coding: utf-8 -*- | |
ROMAN_NUMBERS = { | |
1000: 'M', 900: 'CM', 500: 'D', 400: 'CD', | |
100: 'C', 90: 'XC', 50: 'L', 40: 'XL', | |
10: 'X', 9: 'IX', 5: 'V', 4: 'IV', | |
1: 'I' | |
} |
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/zsh | |
# Scan this directory for game launchers and present window to pick from them. | |
# Dependencies: awk zenity | |
# Game launcher format: | |
# Game launcher is executable text file (i.e. shell script), which contains | |
# one or more lines describing the game being launched. The basic format is: | |
# | |
# #GAME: Game title |
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
.Phony: all run clean | |
all: validate | |
run: validate | |
./validate | |
validate: validate.cpp fileno.o | |
clean: |
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
ACTION!="add|change", GOTO="yubico_end" | |
# Yubico Yubikey Neo | |
ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0010|0110|0111|0116|0407", \ | |
ENV{ID_SECURITY_TOKEN}="1", RUN+="/bin/bash -c '/usr/bin/killall -9 scdaemon; sleep 1; /usr/bin/gpg2 --card-status'" | |
LABEL="yubico_end" |
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
package cz.khardix.scala | |
import swing._ | |
object HelloWorld extends SimpleSwingApplication { | |
def top = new MainFrame { | |
title = "Hello World!" | |
contents = new Button { | |
text = "Click Me!" |
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 | |
# Configuration file for latexmk, automation script for LaTeX builds | |
# Use xelatex by default | |
$pdf_mode = 1; $postscript_mode = $dvi_mode = 0; | |
$pdflatex = "lualatex %O %S"; |
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 <ctype.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <limits.h> | |
int main(void) { | |
const size_t ARRAY_LEN = 256; | |
int data[ARRAY_LEN]; memset(data, 0, ARRAY_LEN*sizeof(int)); |
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/sh | |
LD_PRELOAD="./divos-hack/divos-hack.so" LD_LIBRARY_PATH="." ./EoCApp |
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 asyncio | |
import random | |
async def square(stream): | |
async for num in stream: | |
yield num ** 2 | |
async def add_two(stream): |
OlderNewer