THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
// Super Fast Blur v1.1 | |
// by Mario Klingemann <http://incubator.quasimondo.com> | |
// converted to C++ by Mehmet Akten, <http://www.memo.tv> | |
// Add alpha support by Victor Sigma, <http://www.aphes.com> | |
// | |
// Tip: Multiple invovations of this filter with a small | |
// radius will approximate a gaussian blur quite well. | |
// | |
void superFastBlur(unsigned char *pix, int w, int h, int radius) { |
local shader = love.graphics.newPixelEffect [[ | |
extern vec2 size; | |
extern number factor; | |
vec4 effect(vec4 color, Image img, vec2 texture_coords, vec2 pixel_coords){ | |
vec2 tc = floor(texture_coords * size / factor) * factor / size; | |
return Texel(img, tc); | |
} | |
]] |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
#include "H264_Decoder.h" | |
H264_Decoder::H264_Decoder(h264_decoder_callback frameCallback, void* user) | |
:codec(NULL) | |
,codec_context(NULL) | |
,parser(NULL) | |
,fp(NULL) | |
,frame(0) | |
,cb_frame(frameCallback) | |
,cb_user(user) |
//This program is demo for using pthreads with libev. | |
//Try using Timeout values as large as 1.0 and as small as 0.000001 | |
//and notice the difference in the output | |
//(c) 2009 debuguo | |
//(c) 2013 enthusiasticgeek for stack overflow | |
//Free to distribute and improve the code. Leave credits intact | |
#include <ev.h> | |
#include <stdio.h> // for puts |
# GIT heart FZF | |
# ------------- | |
is_in_git_repo() { | |
git rev-parse HEAD > /dev/null 2>&1 | |
} | |
fzf-down() { | |
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@" | |
} |
#include <stdio.h> | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#include "stb_image_write.h" | |
#include <ft2build.h> | |
#include FT_FREETYPE_H | |
#define NUM_GLYPHS 128 | |
struct glyph_info { | |
int x0, y0, x1, y1; // coords of glyph in the texture atlas |
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols | |
# wayland-scanner is a tool which generates C headers and rigging for Wayland | |
# protocols, which are specified in XML. wlroots requires you to rig these up | |
# to your build system yourself and provide them in the include path. | |
xdg-shell-protocol.h: | |
wayland-scanner server-header \ | |
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@ | |
xdg-shell-protocol.c: xdg-shell-protocol.h |
#pragma once | |
#define DYN_ARR_OF(type) struct { \ | |
type *data; \ | |
type *endptr; \ | |
uint32_t capacity; \ | |
} | |
#if !defined(__cplusplus) | |
#define decltype(x) void* |