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" encoding="UTF-8"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one | |
or more contributor license agreements. See the NOTICE file | |
distributed with this work for additional information | |
regarding copyright ownership. The ASF licenses this file | |
to you under the Apache License, Version 2.0 (the | |
"License"); you may not use this file except in compliance | |
with the License. You may obtain a copy of the License at |
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 <cassert> | |
#include <chrono> | |
#include <iostream> | |
#include <memory> | |
#include <sstream> | |
#include <stdexcept> | |
#include <unordered_map> | |
/////////////////////////////////////////////////////////////////////////////// | |
#ifdef ENABLE_LOGGING | |
# define LOG(x) std::clog << x << std::endl |
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
const constexpr SizeT junk = 'z' - 'a'; | |
Char buffer[L_tmpnam + junk] = {'\0'}; | |
// cppcheck-suppress obsoleteFunctionstmpnam | |
std::tmpnam(buffer); | |
SizeT len = std::strlen(buffer); | |
std::random_device rd; | |
for (SizeT i = len; i < (L_tmpnam + junk - 1); ++i) { | |
buffer[i] = std::max('a', std::min<Char>('z', | |
'a' + (i - len) + (rd() & 0xF))); | |
} |
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
The MIT License (MIT) | |
Copyright (c) <year> <copyright holders> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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 <stdint.h> | |
#include <stdio.h> | |
#include <stddef.h> | |
struct threshold_t { | |
uint8_t upper; | |
uint8_t lower; | |
}; | |
struct threshold_abc_t { |
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 | |
# encoding: UTF-8 | |
try: | |
import urllib.request as urlrequest | |
except ImportError: | |
import urllib as urlrequest | |
def get_mingw_versions(repo_url = 'http://downloads.sourceforge.net/project/' | |
'mingwbuilds/host-windows/repository.txt'): |
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
@echo off | |
verify other 2>nul | |
setlocal EnableDelayedExpansion | |
if not %ERRORLEVEL% equ 0 ( | |
echo Unable to enable extensions | |
goto failure | |
) | |
rem Start the ssh-agent if needed by git | |
for %%i in ("git.exe") do set GIT=%%~$PATH: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
#!/usr/bin/python | |
# | |
# Copyright (c) 2009 Google Inc. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
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
useradd -m guest | |
chown guest:root /home/guest | |
chmod -w /home/guest | |
userdel guest | |
useradd -d /mnt/guest guest | |
passwd --delete guest |
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 | |
# encoding: utf-8 | |
import argparse | |
import errno | |
import logging | |
import os | |
import platform | |
import re | |
import sys |
OlderNewer