Skip to content

Instantly share code, notes, and snippets.

View blockspacer's full-sized avatar
:octocat:

Devspace blockspacer

:octocat:
  • Google
  • USA
View GitHub Profile
@blockspacer
blockspacer / index.html
Created January 9, 2018 11:17
tmp mosaic
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>adasdasd</title>
<script type="text/javascript" src="nem-sdk.js"/></script>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<body>
<div>Hello</div>
@blockspacer
blockspacer / README.txt
Last active December 22, 2018 08:19
wrtc combine
https://docs.google.com/document/d/1J6rcqV5KWpYCZlhWv4vt8Ilrh_f08QC2KA1jbkSBo9s/edit?usp=sharing
@blockspacer
blockspacer / CMakeLists.txt
Last active December 23, 2018 20:23
Segmentation fault WebrtcTestSimple2Peers.cpp
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
project(example-server)
# -fno-rtti for webrtc
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
find_package(Threads REQUIRED)
message("WEBRTC_SRC_PATH=${WEBRTC_SRC_PATH}")
message("WEBRTC_TARGET_PATH=${WEBRTC_TARGET_PATH}")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin"
OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux"
@blockspacer
blockspacer / variant.cpp
Created December 30, 2018 15:45
Configuration variant
#include <iostream>
#include <map>
#include <string>
#include <variant>
#include <vector>
struct ConfValue;
using ConfObject = std::map<std::string, ConfValue>;
using ConfArray = std::vector<ConfValue>;
@blockspacer
blockspacer / Mutex.h
Created February 27, 2019 14:55 — forked from bstaletic/Mutex.h
Clang thread safety annotations
#ifndef BENCHMARK_MUTEX_H_
#define BENCHMARK_MUTEX_H_
#include <mutex>
// Enable thread safety attributes only with clang.
// The attributes can be safely erased when compiling with other compilers.
#if defined(__clang__) && (!defined(SWIG))
#define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
#else
@blockspacer
blockspacer / new_ubuntu.md
Last active September 10, 2023 17:00
fresh ubuntu

Fresh ubuntu? Try this!

TODO: to script with select screen. Extend functionality of https://github.com/cesar-rgon/desktop-app-installer

Keyboard layout switch hotkeys

sudo apt install gnome-tweaks -y
gsettings set org.gnome.desktop.input-sources xkb-options "['grp:ctrl_shift_toggle']"
gsettings set org.gnome.desktop.input-sources xkb-options "['grp:alt_shift_toggle']"
@blockspacer
blockspacer / build-qt-wasm.sh
Created March 4, 2019 07:58 — forked from cajus/build-qt-wasm.sh
Building Qt for WebAssembly
# Get dependencies in place (example for Debian based systems)
sudo apt-get build-dep --yes qt5-default
sudo apt-get install --yes libxcb-xinerama0-dev git python cmake default-jre
# Install Emscripten
git clone https://github.com/juj/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source emsdk_env.sh
@blockspacer
blockspacer / issue.md
Last active March 11, 2019 11:01
qt wasm build error with module-qtcharts

qt 5.13 wasm build error with module-qtcharts

 ~/job/qt5/qtbase/bin/qmake ; make 
shared:WARNING: emcc: cannot find library "qicns"
shared:WARNING: emcc: cannot find library "qtga"
@blockspacer
blockspacer / txt.txt
Created March 12, 2019 08:58
Turn off SSL verification on the whole system (very bad).
# Turn off SSL verification on the whole system (very bad).
# node
echo 'NODE_TLS_REJECT_UNAUTHORIZED=0' >> /home/vagrant/.bashrc
# npm
echo "strict-ssl=false" >> /home/vagrant/.npmrc
echo "registry=http://registry.npmjs.org/" > /home/vagrant/.npmrc
# ruby
echo ':ssl_verify_mode: 0' >> /home/vagrant/.gemrc
# yum
echo "sslverify=false" >> /etc/yum.conf