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 / helpers.cmake
Created September 11, 2019 14:33 — forked from abravalheri/helpers.cmake
CMake examples
if(NOT HOME)
if(WIN32)
string(REPLACE "\\" "/" HOME "$ENV{USERPROFILE}")
else()
set(HOME $ENV{HOME})
endif()
endif()
### Useful Functions and Macros ###
# Prints a list of messages, each one in a new line
@blockspacer
blockspacer / Makefile
Created September 12, 2019 06:44 — forked from kwk/Makefile
Compiling with Address Sanitizer (ASAN) with CLANG and with GCC-4.8
.PHONY: using-gcc using-gcc-static using-clang
using-gcc:
g++-4.8 -o main-gcc -lasan -O -g -fsanitize=address -fno-omit-frame-pointer main.cpp && \
ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=$(shell which llvm-symbolizer) ./main-gcc
using-gcc-static:
g++-4.8 -o main-gcc-static -static-libstdc++ -static-libasan -O -g -fsanitize=address -fno-omit-frame-pointer main.cpp && \
ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=$(shell which llvm-symbolizer) ./main-gcc-static
@blockspacer
blockspacer / index.htm
Created September 13, 2019 06:34
ugui
<!DOCTYPE html>
<html>
<head>
<!-- Automatically updated by your package.json file. -->
<title class="applicationTitle">Your Application Name</title>
<link rel="icon" type="image/x-icon" href="_img/favicon.ico">
<link rel="stylesheet" href="_style/ven.bootstrap.css">
<!-- Change this next line from cerulean to whatever swatch you pick. -->
@blockspacer
blockspacer / gist:8b55401fc63aafc6fdd77fcd3e67cb0f
Created October 2, 2019 08:38 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@blockspacer
blockspacer / index.css
Created October 15, 2019 09:41
ripple button
/* Set the colour of the effect */
.bn .ripple-effect {
background: #206aae;
}
/* Some default button styling */
.bn {
padding: 1em 2em;
background: #2e85d6;
color:#fff;
@blockspacer
blockspacer / what-forces-layout.md
Created October 18, 2019 11:27 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@blockspacer
blockspacer / framework-sizes.md
Created October 25, 2019 12:48 — forked from Restuta/framework-sizes.md
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks โ€“ React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@blockspacer
blockspacer / mem_function_traits.cpp
Created November 6, 2019 07:59 — forked from vmrob/mem_function_traits.cpp
Member Function Traits
#include <utility>
#include <functional>
#include <type_traits>
#include <typeinfo>
#include <iostream>
namespace meta {
// detects callable objects, not functions
FROM alpine:latest AS devel
RUN apk --no-cache add git
RUN mkdir /app
RUN touch /app/foo
FROM scratch AS runtime
COPY --from=devel /app/. /app
@blockspacer
blockspacer / WSL.md
Created January 31, 2020 05:30
Windows Subsystem for Linux (WSL) to Build a Development Environment