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
# Description: Build configuration for the "raylib [core] example - World to screen" | |
# using raylib and raylib_cpp from their repositories. | |
# (https://www.raylib.com/examples/core/loader.html?name=core_world_screen) | |
# Compatibility: macOS 13.3 | |
# Dependencies: raylib 4.5.0, raylib_cpp v4.5.0 | |
cmake_minimum_required(VERSION 3.25) | |
project(a_project) | |
set(CMAKE_BUILD_TYPE Debug) |
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
# Description: Build configuration for the "SFML example - Basic window and event handling" | |
# using SFML from its repository. | |
# Compatibility: macOS 13.3 | |
# Dependencies: SFML (master branch) | |
cmake_minimum_required(VERSION 3.25) | |
project(a_window) | |
set(CMAKE_BUILD_TYPE Debug) | |
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/build) |
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
#!/bin/bash | |
# This script cleans the project directory. | |
# The CLIs are compatible with Linux and Mac OS X. | |
## Function: clean_project | |
function clean_project() { | |
# Delete CMake generated files except CMakeLists.txt | |
find . -iwholename '*cmake*' -not -name CMakeLists.txt -delete | |
# Delete makefile |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,00,00,3a,00,00,00,00,00 | |
0000 0000 0000 0000 0200 0000 1d00 3a00 0000 0000 |
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.25) | |
set(CMAKE_CXX_STANDARD 17) | |
project(my_project) | |
set(CMAKE_BUILD_TYPE Debug) | |
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") | |
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") | |
set(RAYLIB_LIB raylib/src/libraylib.a) | |
set(RAYLIB_INCLUDE raylib/src) |
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
// Start `node d3-server.js` | |
// Then visit http://localhost:1337/ | |
// | |
var d3 = require('d3'), | |
http = require('http'), | |
jsdom = require('jsdom/lib/old-api'), | |
fs = require('fs'), | |
xmldom = require('xmldom'); | |
http.createServer(function (req, res) { |
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
var fs = require('fs'); | |
var d3 = require('d3') | |
require('jsdom-global')() | |
var body = document.querySelector('body') | |
d3.select(body) | |
.append('svg:svg') | |
.attr('xmlns', 'http://www.w3.org/2000/svg') | |
.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink') |
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
var request = require('request') | |
, path = require('path') | |
, fs = require('fs') | |
, url = "https://api.github.com/users/thomastraum/gists" | |
, savepath = './gists'; | |
request(url, function (error, response, body) { | |
if (!error && response.statusCode == 200) { |
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
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, { | |
'Content-Type': 'text/plain' | |
}); | |
res.end('Hello World\n'); | |
}).listen(1337, '127.0.0.1'); | |
console.log('Server running at http://127.0.0.1:1337/'); |
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
// pre-render d3 charts at server side | |
var d3 = require('d3') | |
, jsdom = require('jsdom') | |
, fs = require('fs') | |
, htmlStub = '<html><head></head><body><div id="dataviz-container"></div><script src="js/d3.v3.min.js"></script></body></html>' | |
jsdom.env({ | |
features : { QuerySelector : true } | |
, html : htmlStub | |
, done : function(errors, window) { |