Skip to content

Instantly share code, notes, and snippets.

View netcell's full-sized avatar

Nguyễn Tuấn Anh netcell

View GitHub Profile
@netcell
netcell / Dockerfile
Last active January 18, 2021 04:19
Wordpress Development with Docker
FROM chriszarate/wordpress
RUN \
apt-get update && \
apt-get install unzip wget mysql-client -y && \
rm -rf /var/lib/apt/lists/*
COPY ./uploads.ini /usr/local/etc/php/conf.d/uploads.ini
COPY docker-entrypoint.sh /usr/local/bin/
@netcell
netcell / run.js
Created January 11, 2018 10:34
Insert Table of Content at the top of Dropbox Paper
(() => {
clear()
const childTo = (children, parents) => {
children.forEach(datum => {
let parent = parents.filter(parent => parent.idx < datum.idx).pop();
parent.children.push(datum);
})
}
@netcell
netcell / guide.md
Last active March 22, 2017 07:59
Update firmware for Galaxy tab 3
  1. Mở app Cài đặt (ở homescreen hoặc trong danh sách app)

  2. Trong màn hình app Cài đặt, cuộn xuống cuối cột bên trái và chọn Giới thiệu về điện thoại.

2

  1. Chọn Cập nhật phầm mềm ở cột bên phải. Trong màn hình Cập nhật phầm mềm, chọn Cập nhật.

3

@netcell
netcell / fullcalendar_with_ionic2.md
Last active November 1, 2017 16:14
Fullcalendar.io with ionic 2 from forum

Hello Victor,

I just started using this plugin today so I'm not an expert but here is what I did to make it work.

  1. npm install angular2-fullcalendar --save
  2. Create a new component: ionic g component full-calendar
  3. In full-calendar.html I inserted:
<angular2-fullcalendar [options]="calendarOptions"></angular2-fullcalendar>
@netcell
netcell / ionic2_build_and_upload
Created November 24, 2016 09:54
ionic2_build_and_upload
npm install -g ionic cordova karma-cli;
npm install;
ionic login --email <email> --password <password>;
ionic io init;
npm run ionic:build;
ionic upload;
@netcell
netcell / Type.php
Created May 15, 2016 08:40
gds-php wrapper Type definition
<?php
namespace App\Datastore\Abstracts;
class Type {
const String = 1;
const Integer = 2;
const Datetime = 3;
const Float = 4;
const Boolean = 5;
function getRandomShapes(width, height) {
var shapeArray = new Array();
for (var y = 0; y < height; y++) {
for (var x = 0; x < width; x++) {
var topTab = undefined;
var rightTab = undefined;
var bottomTab = undefined;
var leftTab = undefined;
@netcell
netcell / AddPlugin.js
Last active September 15, 2015 09:24
Phaser Inspector Plugin Example
Phaser.Plugin.Inspector.DetailPlugin.add(Phaser.Plugin.Inspector.DetailPlugin.FrameRenderPlugin);
@netcell
netcell / PhaserFillscreen.js
Last active February 22, 2024 23:02
Setting for Phaser.js to fill the screen on web browsers and Cocoon.js
/** Config part */
var FIXED_SIZE = 600;
var FIXED_MEASURE = 'Height';
/** Name maping */
var fixedName = FIXED_MEASURE;
var resName = fixedName === 'Height' ? 'Width' : 'Height';
var FIXED_NAME = fixedName.toUpperCase();
var RES_NAME = resName.toUpperCase();
@netcell
netcell / VirtualJoystick
Created April 3, 2015 05:10
Phaser Virtual Joystick
var normalize = Phaser.Point.normalize;
var zero = new Phaser.Point(0, 0);
class Joystick extends Phaser.Sprite {
constructor({x, y, holder, pin}) {
super(game, 0, 0, holder);
this.anchor.setTo(0.5, 0.5);
this.fixedToCamera = true;
this.cameraOffset.setTo(x, y);