Skip to content

Instantly share code, notes, and snippets.

Giap Nguyen nvg58

Block or report user

Report or block nvg58

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
@stnguyen
stnguyen / main.lua
Created Jan 24, 2015
Cocos2d-x v3 LUA multiple resolution handling
View main.lua
local LARGE_RESOURCE = { width = 1920, height = 1280, folder = "hd" }
local MEDIUM_RESOURCE = { width = 960, height = 640, folder = "md" }
local DESIGN_WIDTH = 480
local DESIGN_HEIGHT = 320
local function main()
collectgarbage("collect")
-- avoid memory leak
collectgarbage("setpause", 100)
@valryon
valryon / ScrollingScript.cs
Last active Sep 14, 2019
Multi directionnal infinite scrolling script.This is related to the tutorial http://pixelnest.io/tutorials/2d-game-unity/parallax-scrolling/
View ScrollingScript.cs
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
/// <summary>
/// Parallax scrolling script that should be assigned to a layer
///
/// This is related to the tutorial http://pixelnest.io/tutorials/2d-game-unity/parallax-scrolling/
///
@esperlu
esperlu / mysql2sqlite.sh
Created Apr 27, 2011
MySQL to Sqlite converter
View mysql2sqlite.sh
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
You can’t perform that action at this time.