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 <boost/uuid/sha1.hpp> | |
void display(char* hash) | |
{ | |
std::cout << "SHA1: " << std::hex; | |
for(int i = 0; i < 20; ++i) | |
{ | |
std::cout << ((hash[i] & 0x000000F0) >> 4) | |
<< (hash[i] & 0x0000000F); |
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 <thread> | |
class InterruptedException : public std::exception { | |
}; | |
class AsyncThread { | |
public: | |
AsyncThread() { | |
std::unique_lock<std::mutex> lock(mutex); |
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> | |
int main() { | |
long long g = -4294966190; | |
unsigned int p = 0; | |
--p; | |
g += p; | |
std::cout << g << 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
C:\Users\jhass_000\git\cmaketest>type main.cpp | |
#include <ft2build.h> | |
C:\Users\jhass_000\git\cmaketest>type CMakeLists.txt | |
cmake_minimum_required(VERSION 2.8) | |
include_directories("freetype2") | |
add_library( freetype-gl STATIC "main.cpp") | |
C:\Users\jhass_000\git\cmaketest>cmake -G "MinGW Makefiles" . | |
-- Configuring done |
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
{ stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib | |
, dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf | |
, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xlibs | |
}: | |
let | |
atomEnv = buildEnv { | |
name = "env-atom"; | |
paths = [ | |
stdenv.gcc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3 |
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
shopt -s dotglob | |
du -sk * | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done |
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
fn draw(&self, shader_programs: &mut ShaderPrograms) { | |
self.text.draw(&mut shader_programs); | |
} |
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
clone: | |
recursive: true | |
build: | |
image: ubuntu:16.04 | |
commands: | |
- apt-get update | |
- apt-get install ... | |
- ... | |
environment: | |
- CLICOLOR_FORCE=1 |
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
[Macaron] PANIC: runtime error: makeslice: cap out of range | |
/usr/local/go/src/runtime/panic.go:423 (0x42b609) | |
/usr/local/go/src/runtime/slice.go:30 (0x440aac) | |
/tmp/d20160903-15-h2vuet/opt/gogs/.heroku/go/src/github.com/gogits/gogs/models/org_team.go:40 (0x59451a) | |
/tmp/d20160903-15-h2vuet/opt/gogs/.heroku/go/src/github.com/gogits/gogs/models/org_team.go:58 (0x594caa) | |
/tmp/d20160903-15-h2vuet/opt/gogs/.heroku/go/src/github.com/gogits/gogs/models/org_team.go:320 (0x597e95) | |
/tmp/d20160903-15-h2vuet/opt/gogs/.heroku/go/src/github.com/gogits/gogs/routers/org/teams.go:260 (0x8c1b08) | |
/usr/local/go/src/runtime/asm_amd64.s:437 (0x45c52e) | |
/usr/local/go/src/reflect/value.go:432 (0x50110a) | |
/usr/local/go/src/reflect/value.go:300 (0x4ffdd1) |
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
// launch.json | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "example", | |
"type": "cppdbg", | |
"request": "launch", | |
"miDebuggerPath": "/usr/bin/gdb", | |
"targetArchitecture": "x64", |
OlderNewer