Skip to content

Instantly share code, notes, and snippets.

View bitlather's full-sized avatar

Jun Reiderdai bitlather

View GitHub Profile
@bitlather
bitlather / PixelBoy.cs
Created July 18, 2020 16:12
Pixellated unity renderer by wtfmig
// Downloaded from https://pastebin.com/5mkBeZ5S
//PIXELBOY BY @WTFMIG
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
[AddComponentMenu("Image Effects/PixelBoy")]
public class PixelBoy : MonoBehaviour
{
it 'should do a thing' do
ActiveRecord::Base.logger = Logger.new(STDOUT) if defined?(ActiveRecord::Base)
end
sudo service postgresql stop
sync
sudo sysctl -w vm.drop_caches=3 # echo 3 > /proc/sys/vm/drop_caches
sudo service postgresql start
SELECT pg_size_pretty( pg_database_size('db/database_name') );

Here's an example "concise log" that's written to a file every time a room loads or I call a function to dump this information:

   # |                                               ROOM |                  MAPS |                 LISTS |                STACKS |                 GRIDS |                QUEUES |            PRIORITIES |                 PATHS |                VBUFFS | 
   1 |           se_initialize_tile_palette_to_color_room | (        )        475 | (        )          9 | (        )          1 | (        )          8 | (        )          0 | (        )          0 | (        )          0 | (        )          0 | 
   2 |                               se_stage_editor_room | (   +1128)       1603 | (    +364)        373 | (      +2)          3 | (    +880)        888 | (      +3)          3 | (        )          0 | (        )          0 | (        )          0 | 
   3 |                                        render_room | (    +114)       1717 | (      -2)        371 | (      -2)          1 | 

For my comment on https://nikles.it/2020/gamemaker-tutorial/better-moving-platforms/

Note that I have my own scripts for creating/destroying data structures, which help me track leaks. create_list() and unregister_and_destroy_list() won't work for you.

Additionally, I did not include the logic move_platform_y_downwards() and move_platform_y_upwards() because it's a light refactoring of what can be found in the tutorial.

move_platform_y():

/// @param yvel
var _yvel = argument0;
@bitlather
bitlather / Install Private Repo with NPM.md
Created April 14, 2020 20:13
npm install on private repo

If this fails:

$ npm install https://github.com/transistorsoft/cordova-background-geolocation.git
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://github.com/transistorsoft/cordova-background-geolocation.git
npm ERR!
npm ERR! remote: Invalid username or password.
npm ERR! fatal: Authentication failed for 'https://github.com/transistorsoft/cordova-background-geolocation.git/'
npm ERR!
npm ERR! exited with error code: 128

Installing An Existing Android Ionic Project on Linux Mint 18 VM

Versions for various software may differ; I'm just including the last ones I used that worked.

Java Development Kit version 8

Note: This may or may not be necessary; I installed this before working on the ionic project so I'm not certain if it was needed.

$ sudo apt-get update