Skip to content

Instantly share code, notes, and snippets.

View DykiSA's full-sized avatar
👋
Welcome to my github account

DykiSA

👋
Welcome to my github account
View GitHub Profile
@DykiSA
DykiSA / RMDoc.md
Last active August 7, 2018 10:59
FileResponsive File Manager - subfolder as root folder

Responsive File Manager - make subfolder as root folder

This implementation is to separate subfolders for differents users.

Add new setting in tinymce init config

{
	// ...
	filemanager_path: "path/to/filemanager",
@DykiSA
DykiSA / ExampleActivity.java
Created May 17, 2018 02:26
Ready to use HTTP request class for java android using valley library
// change this package name based on your current package
package com.servertechno.e_bikes.activities;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import com.android.volley.VolleyError;
@DykiSA
DykiSA / upgrade-nodejs.md
Last active April 20, 2018 07:10
Steps to upgrade NodeJs version

So follow these steps to upgrade node:

  1. sudo npm cache clean -f
  2. sudo npm install -g n
  3. sudo n stable
  4. sudo ln -sf /usr/local/n/versions/node/5.4.1/bin/node /usr/bin/node (the bold text/version should be the one installed in during above step.)

ie if 8.1.1 is installed then do sudo ln -sf /usr/local/n/versions/node/8.1.1/bin/node /usr/bin/node

node –v (Should show updated version now)

@DykiSA
DykiSA / recursive-tree.js
Last active April 20, 2018 07:08
Create recrursive tree from relational data source
let d = [{
"name": "CEO",
"parent": null,
"id": "5847e80312896b2fa49ce428"
}, {
"name": "A",
"parent": "5847e80312896b2fa49ce428",
"id": "5847f58289046550aa05a49d"
}, {
"name": "A1",
@DykiSA
DykiSA / curl.md
Created March 22, 2018 15:37 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@DykiSA
DykiSA / global_helper.php
Created October 12, 2016 03:11
Codeigniter General Helper I Always Used
<?php
/**
* Global function
* place for all global function
*/
$GLOBALS['CI'] =& get_instance();
if (! function_exists('flash_message'))
{
function flash_message($can_hide = false) {
@DykiSA
DykiSA / MY_Controller.php
Last active October 12, 2016 03:13
Base controller class for initialize codeigniter projcet
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* MY_Controller
* Base controller class for initialize codeigniter projcet
*
* created by acing at 01/11/2015 12:01 WIB
*/
class MY_Controller extends CI_Controller {
/**
@DykiSA
DykiSA / open-port-on-linux.md
Last active February 15, 2018 06:14
Tutorial Linux: Opem Port on Linux

#Opening a Port on Linux#

  1. Check if the port is being used or not (testing port 3000 in this example)

    $ netstat -na | grep 3000
    
  2. If the port is in use, then most likely it will be the software firewall blocking you. You can check by running

@DykiSA
DykiSA / tutorial.md
Last active January 18, 2018 09:56
Lists link of tutorials