This file contains hidden or 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
/*============================================================================== | |
= Automatic test runner. Add tests below = | |
==============================================================================*/ | |
$(function () { | |
/*========== Test runner ==========*/ | |
var Test = function () { | |
var that = {}, | |
actions = [], | |
index = -1, elapsedTime = 0; |
This file contains hidden or 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 "$(( $( date +%s ) - 3600 ))" |
This file contains hidden or 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 <netdb.h> | |
#include <arpa/inet.h> | |
#include <iostream> | |
#include <cstring> | |
#include <stdexcept> | |
int main(int argc, char* argv[]) { | |
if (argc < 2) { | |
return 0; | |
} |
This file contains hidden or 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 <string> | |
#include <vector> | |
#include <iostream> | |
using byte = uint8_t; | |
static std::string hexEncode(const std::vector<uint8_t>& data) { | |
std::string result(data.size() * 3, ' '); | |
for (size_t i = 0, k = 0; k < result.size(); ++i, k += 3) { | |
static const char hex[] = "0123456789abcdef"; |
This file contains hidden or 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 -*- | |
import os | |
import threading | |
import subprocess | |
import sys | |
import sublime | |
import sublime_plugin |
This file contains hidden or 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 -*- | |
import os | |
import threading | |
import subprocess | |
import sys | |
import sublime | |
import sublime_plugin |
This file contains hidden or 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
sudo date -s "$( ssh user@host 'date "+%Y-%m-%d %H:%M:%S"' )"; sudo hwclock --systohc |
This file contains hidden or 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
############################################################################# | |
# Makefile for building: qt-hello | |
# Generated by qmake (3.0) (Qt 5.2.0) | |
# Project: qt-hello.pro | |
# Template: app | |
# Command: /home/pez/workspace/esa-universal/sdk/toolchain/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/qmake | |
-spec /home/pez/workspace/esa-universal/sdk/usr/mkspecs/devices/linux-imx6-g++ -o Makefile qt-hello.pro | |
############################################################################# | |
MAKEFILE = Makefile |
This file contains hidden or 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
static int aStrangeFunction() { | |
return ({ std::string xxx{"the answer is"}; 42; }); | |
} | |
TEST(AStrangeFunction, AlwaysReturnTheAnswer) { | |
ASSERT_EQ(42, aStrangeFunction()); | |
} |