Skip to content

Instantly share code, notes, and snippets.

View khromov's full-sized avatar

Stanislav Khromov khromov

View GitHub Profile
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active December 16, 2024 19:11
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active December 1, 2024 08:09
Building a react native app in WSL2
@verticalgrain
verticalgrain / chip-flashing-guide-nov-2018.md
Last active August 31, 2024 12:51
NextThingCo C.H.I.P. Flashing guide as of November, 2018

Below are the steps required to flash a NextThingCo CHIP or PocketCHIP from the command line, as of November 2018. The web flasher no longer works, and there are numerous errors when flashing from the command line, mostly due to broken dependencies. The following method works for flashing a CHIP as of November 2018:

Note: Flashing must be done on Linux. Tested on Ubuntu and Rasparian. Mac OS seems to not work.

  1. Download and unpack the CHIP-SDK.zip from one of the following:
  1. Download and unpack CHIP-tools.zip from one of the following:
@nikjft
nikjft / zapier_webhook_bookmarklet.js
Last active August 20, 2019 08:24 — forked from brunohq/zapier_webhook_bookmarklet.js
Bookmarklet to trigger a Zapier Webhook from any web page. Any selected text as well as the page title and URL are passed to Zapier.
javascript:(function()
{
var webhookURL = '[your webhook URL from Zapier]';
var selectedText = encodeURIComponent(window.getSelection().toString());
var iframe = document.createElement('iframe');
iframe.name = 'response';
iframe.style.visibility = 'hidden';
document.body.appendChild(iframe);
var form = document.createElement('form');
@jkempff
jkempff / EventRecorder.js
Created May 11, 2018 16:17
Records DOM-events and replays them on demand. Nice for server side rendered pages: record during page-load, replay after all javascript was initialized.
/**
* EventRecorder
* @class
* @classdesc An EventRecorder can record and replay any event on any DOM node
* @param {string} [eventName=click] - Name of the events to record
* @param {class} [EventClass=MouseEvent] - The class that should be used to recreate the events
* @param {object} [context=self] - The context DOM element, the events should be fetched from
* @example
* // Create a recorder for click events
* const clickRecorder = new EventRecorder('click', MouseEvent, window);
@Shelob9
Shelob9 / Select.js
Last active December 18, 2019 22:57 — forked from royboy789/Select.react.js
Gutenberg React state example
const { __ } = wp.i18n;
const { Component } = wp.element;
const el = wp.element.createElement;
export default class Select extends Component {
constructor( props ) {
super( ...props );
this.selectCallback = this.selectCallback.bind(this);
this.state = {
javascript:a=1;/** Copy & paste your event name and key over there. --> **/ d={event:' my_event_name ',key:' abcdefghijklmnopqrstuvwxyz '}; /** --> Please don't touch this --> **/ u='https://maker.ifttt.com/trigger/'+d.event.trim()+'/with/key/'+d.key.trim()+'?t='+(new Date()).getTime();window.open(u).close();/** Go to the very beginning **/
@soderlind
soderlind / anonymize-comment-ip.php
Last active May 20, 2018 05:02
GDPR: Anonymize WordPress user IP address in comments, supports IP4 and IP6
<?php
if ( true == apply_filters( 'is_gdpr', true ) ) {
add_filter( 'pre_comment_user_ip', function( $ip ) {
$packed_in_addr = inet_pton( $ip );
if ( 4 == strlen( $packed_in_addr ) ) {
return inet_ntop( inet_pton( $ip ) & inet_pton( '255.255.0.0' ) );
} else {
return inet_ntop( inet_pton( $ip ) & inet_pton( 'ffff:ffff:ffff:ffff:0000:0000:0000:0000' ) );
}
@brianneisler
brianneisler / cheat-sheet.js
Last active November 27, 2022 08:23
Cheat sheet - es6 import/export mixed with require/modules.exports
require('./module.js') // { a: 1 }
import module from './module.js' // undefined
import { a } from './module.js' // 1
require('./module2.js') // { default: { a: 1 }, b: 2 }
import module2 from './module2.js' // { a: 1}
import { b } from './module2.js' // 2
require('./module3.js') // { default: { a: 1 }, b: 2 }
@pelmered
pelmered / wp-db-backup.sh
Last active August 29, 2015 14:26
WP-CLI snippets and scripts
# Only database backup
declare -a SITES=('site1' 'site2' 'site3' 'site4');
SITES_PATH_BASE=/var/www/
SITES_PATH_SUFIX=/repo/public
SITES_BACKUP_FOLDER=backups
CURRENT_DATE=`date +%Y-%m-%d`;