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
# NOTE: REQUIRES MESON https://mesonbuild.com | |
# GNU FRIBIDI (Logical to Visual reordering for bidirectional text display) | |
# Use the following snippet within your CMakeLists.txt, replacing your-target-here | |
# with the name of the CMake target you'd like to link with GNU Fribidi. | |
# FIXME: Untested on MacOS | |
include(ExternalProject) | |
ExternalProject_Add(ext_fribidi | |
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/fribidi | |
GIT_REPOSITORY https://github.com/fribidi/fribidi.git | |
CONFIGURE_COMMAND meson setup . ../ext_fribidi -Dbin=false -Ddocs=false -Dtests=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
cmake_minimum_required(VERSION 3.14) | |
# NOTE: Just replace all three occurences of `tree-sitter-c` to whatever language grammar you are compiling. Nothing else needs changed. | |
# Then just run `cmake -B bld` and `cmake --build bld` to get a shared object file that can be installed according to https://tree-sitter.github.io/tree-sitter/syntax-highlighting#paths . | |
project(tree-sitter-c) | |
add_library( | |
tree-sitter-c | |
SHARED | |
src/parser.c |
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
// Place in your body: | |
// <div id="randomimg"></div> | |
$(function () { | |
GetRandRedditImage("Pics"); | |
function GetRandRedditImage(subreddit) { | |
var imgcontainer = $("#randomimg"); | |
var aRandomNum = Math.floor((Math.random() * 25) + 1); |