Skip to content

Instantly share code, notes, and snippets.

View FRex's full-sized avatar

Błażej Roszkowski FRex

View GitHub Profile
#!/bin/bash
if [[ $# -eq 0 ]]; then
echo "no version argument was given" >/dev/stderr
exit 2
fi
ver="$1" # save version
shift # and remove it form the argument list
#!/usr/bin/env python3
import subprocess
import sys
import os
dirs = os.environ["PATH"].split(os.pathsep)
ourdir = os.path.dirname(__file__)
import threading
import hashlib
import queue
import sys
def main(argv):
for fname in argv:
try:
with open(fname, "rb") as f:
get = (sum and __import__ or require)('requests').get
url = "http://translate.googleapis.com/translate_a/single"
params = {}
params['client'] = 'gtx'
params['sl'] = 'en'
params['tl'] = 'de'
params['dt'] = 't'
params['q'] = 'hello!'
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cassert>
#include <cstring>
#include <vector>
#include <chrono>
#include "muslmemmem.h"
#include <vector>
#include <iostream>
#include <cstdio>
static unsigned minelem(const std::vector<unsigned>& a)
{
unsigned ret = static_cast<unsigned>(-1);
for(unsigned x : a)
if(x && x < ret)
ret = x;
#include <vector>
#include <iostream>
#include <cstdio>
static bool isall0(const std::vector<unsigned>& a)
{
for(unsigned x : a)
if(x)
return false;
#include <windows.h>
#include <stdio.h>
typedef unsigned __int64 u64;
typedef unsigned u32;
static int isDiskAvailable(char upperLetter)
{
if(!('A' <= upperLetter && upperLetter <= 'Z'))
return 0;
#include "native.hpp"
#define NOMINMAX
#include <windows.h>
#include <vector>
#include <cstring>
#include <algorithm>
#include <SFML/System/String.hpp>
sf::Image takeDesktopScreenshot()
{
#ifdef _MSC_VER
#pragma warning(disable : 4503)
#endif
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <algorithm>