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 | |
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 |
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 | |
import subprocess | |
import sys | |
import os | |
dirs = os.environ["PATH"].split(os.pathsep) | |
ourdir = os.path.dirname(__file__) |
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 threading | |
import hashlib | |
import queue | |
import sys | |
def main(argv): | |
for fname in argv: | |
try: | |
with open(fname, "rb") as f: |
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
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!' |
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
#define _CRT_SECURE_NO_WARNINGS | |
#include <cstdio> | |
#include <cstdlib> | |
#include <string> | |
#include <cassert> | |
#include <cstring> | |
#include <vector> | |
#include <chrono> | |
#include "muslmemmem.h" |
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 <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; |
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 <vector> | |
#include <iostream> | |
#include <cstdio> | |
static bool isall0(const std::vector<unsigned>& a) | |
{ | |
for(unsigned x : a) | |
if(x) | |
return false; |
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 <windows.h> | |
#include <stdio.h> | |
typedef unsigned __int64 u64; | |
typedef unsigned u32; | |
static int isDiskAvailable(char upperLetter) | |
{ | |
if(!('A' <= upperLetter && upperLetter <= 'Z')) | |
return 0; |
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 "native.hpp" | |
#define NOMINMAX | |
#include <windows.h> | |
#include <vector> | |
#include <cstring> | |
#include <algorithm> | |
#include <SFML/System/String.hpp> | |
sf::Image takeDesktopScreenshot() | |
{ |
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
#ifdef _MSC_VER | |
#pragma warning(disable : 4503) | |
#endif | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <set> | |
#include <map> | |
#include <algorithm> |
NewerOlder