Skip to content

Instantly share code, notes, and snippets.

How come GitHub doesn't support 🦕 as status emoji

Vadim Dyachenko YellowAfterlife

How come GitHub doesn't support 🦕 as status emoji
Block or report user

Report or block YellowAfterlife

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View simple-iso.html
<html><head>
</head><body>
<div style="text-align: center">
<canvas width="640" height="360" id="canvas">
</canvas>
<br>Click to change tiles.
</div>
<script type="text/javascript">(function() {
View BouncingLootEffects.js
(function() {
function $extend(superClass, fields) {
function base() { }
base.prototype = superClass;
var proto = new base();
for (var name in fields) proto[name] = fields[name];
if (fields.toString !== Object.prototype.toString) proto.toString = fields.toString;
return proto;
}
//{
View BouncingLootEffects.hx
import js.Browser.*;
import js.html.CanvasElement;
import js.html.CanvasRenderingContext2D;
import js.html.HTMLDocument;
import js.html.MouseEvent;
import sf.test.Test.Entity;
/**
* @author YellowAfterlife
* http://yal.cc/top-down-bouncing-loot-effects/
@YellowAfterlife
YellowAfterlife / Test.hx
Created Dec 24, 2015
Messing with various small code transformations in CustomJSGenerator.
View Test.hx
import js.Browser.*;
import js.html.CanvasElement;
import js.html.CanvasRenderingContext2D;
import js.html.HTMLDocument;
class Test {
static var canvas:CanvasElement;
static var context:CanvasRenderingContext2D;
static var images:Array<CanvasElement>;
static function reset() {
View draw_circle_width.gml
/// draw_circle_width(x, y, rad1, rad2, segments)
var _x; _x = argument0;
var _y; _y = argument1;
var r1; r1 = argument2;
var r2; r2 = argument3;
var sn; sn = argument4;
//
var i; i = 0;
draw_primitive_begin(pr_trianglestrip);
repeat (sn + 1) {
View swickdeck.css
/* Note: set "Applies to" to "URLs on domain" "tweetdeck.twitter.com" */
/* */
.trends-column { display: none }
/* Ensure little borders for previews */
.mdl.s-full { width: calc(100% - 32px) }
/* Hide "unfollow" buttons from profile popup */
.prf-actions .s-following .follow-btn {
display: none;
}
.prf-actions .s-following .follow-combo:after {
@YellowAfterlife
YellowAfterlife / bbox_collision_line_move.gml
Created Sep 16, 2015
Movement code for GameMaker using bbox_ variables and collision_line calls.
View bbox_collision_line_move.gml
if (keyboard_check(vk_left)) repeat (3) {
var _x = bbox_left - 1;
if (!collision_line(_x, bbox_top, _x, bbox_bottom, obj_solid, false, true)) x -= 1;
}
if (keyboard_check(vk_right)) repeat (3) {
var _x = bbox_right + 1;
if (!collision_line(_x, bbox_top, _x, bbox_bottom, obj_solid, false, true)) x += 1;
}
if (keyboard_check(vk_up)) repeat (3) {
var _y = bbox_top - 1;
@YellowAfterlife
YellowAfterlife / ds_map_iter.gml
Created Sep 9, 2015
Comparing various methods of iterating over ds_map
View ds_map_iter.gml
var map = ds_map_create();
var keys = ds_list_create();
var values = ds_list_create();
var num = 10000;
var t, k, v;
for (var i = 0; i < num; i++) {
k = i * 2 + 1;
v = irandom(10);
ds_list_add(keys, k);
ds_list_add(values, v);
View test.gml
repeat (10000) {
instance_create(0, 0, obj_some); // (blank)
}
var t, r, this;
r = ds_list_create();
this = 1000;
//
t = current_time;
with (all) if (id != this) ds_list_add(r, id);
show_debug_message(string(current_time - t) + "ms"); // 4ms
@YellowAfterlife
YellowAfterlife / haxe.php
Created Aug 11, 2015
A Haxe syntax highlighter for GeSHi (http://qbnz.com/highlighter/)
View haxe.php
<?php
$language_data = array (
'LANG_NAME' => 'Haxe',
'COMMENT_SINGLE' => array(1 => '//'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
You can’t perform that action at this time.