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 <stdlib.h> | |
#include <string.h> | |
#ifndef NUM_WORDS | |
#define NUM_WORDS 10 | |
#endif | |
#ifndef CHUNK_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/env python | |
import requests | |
from datetime import datetime as dt | |
import time | |
import re | |
ipaddr = '192.168.0.1' | |
#ipaddr = '192.168.0.60' | |
now = dt.utcnow() |
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 <iostream> | |
#include <string> | |
#include <iterator> | |
#include <vector> | |
template <typename T> | |
struct reversed | |
{ | |
T& iterable; |
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 | |
max=20 | |
prefix=$1 | |
unique=$$-$(date +%s | base64) | |
askpass=./sshpass-${unique} | |
run_command() { | |
DISPLAY=nothing:0 SSH_ASKPASS=${askpass} setsid ssh -oStrictHostKeyChecking=no -t ${superuser}@$1 "$2" 2> /dev/null | |
} |
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 <tmmintrin.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stddef.h> | |
#include <time.h> | |
static uint64_t current_time() | |
{ | |
struct timespec ts; |
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 <stddef.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
struct __attribute__((packed)) class_object | |
{ | |
// TODO* handle | |
void *super; | |
void (*destructor)(void*, void*); |
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
Array.prototype.append = function (element) { | |
this.push(element); | |
return this; | |
}; | |
range = (length) => { | |
return (function range() { | |
if (this.length < length) { | |
this.push(this.length); |
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 <type_traits> | |
template <typename T, typename = std::enable_if_t<std::is_compound_v<T>>> | |
constexpr T sum(const T& v) noexcept | |
{ | |
return v; | |
} | |
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 <cuda.h> | |
#include <stdexcept> | |
#include <string> | |
#include <vector> | |
#include <memory> | |
#include <cstdint> | |
#include <cstdio> | |
#include <unistd.h> | |
using error = std::runtime_error; |
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
### List operators | |
slice = $(wordlist 2,$(words $1),$1) | |
replicate = $(if $(call eq,$(words $4),$1),$3,$(call replicate,$1,$2,$3 $2,$(words $4) $4)) | |
rotate = $(call slice,$1) $(firstword $1) | |
map = $(if $2,$(call map,$1,$(call slice,$2),$3,$4 $(call $1,$3,$(firstword $2),$4)),$4) | |
fold = $(if $2,$(call fold,$1,$(call slice,$2),$(call $1,$3,$(firstword $2))),$3) | |
zip = $(if $2,$(call zip,$1,$(call slice,$2),$(call rotate,$3),$4 $(call $1,$(firstword $2),$(firstword $3))),$4) | |
### Arithmetic operators | |
inc = $(words $(call replicate,$1,_) _) |
OlderNewer