Skip to content

Instantly share code, notes, and snippets.

Avatar

Jun Reiderdai bitlather

View GitHub Profile
@bitlather
bitlather / PixelBoy.cs
Created Jul 18, 2020
Pixellated unity renderer by wtfmig
View PixelBoy.cs
// Downloaded from https://pastebin.com/5mkBeZ5S
//PIXELBOY BY @WTFMIG
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
[AddComponentMenu("Image Effects/PixelBoy")]
public class PixelBoy : MonoBehaviour
{
View Rails-Output all queries from spec.rb
it 'should do a thing' do
ActiveRecord::Base.logger = Logger.new(STDOUT) if defined?(ActiveRecord::Base)
end
View Make postgres database cold on linux mint.md
sudo service postgresql stop
sync
sudo sysctl -w vm.drop_caches=3 # echo 3 > /proc/sys/vm/drop_caches
sudo service postgresql start
View Get size of postgres database.sql
SELECT pg_size_pretty( pg_database_size('db/database_name') );
View nikles.it better-moving-platforms comment2-b.md

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 | 
View nikles.it better-moving-platforms comment2.md

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;
View nikles.it better-moving-platforms comment1.md
View Install Private Repo with NPM.md

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
View Mobile: Ionic & Android Studio on Linux Mint 18.md

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