Skip to content

Instantly share code, notes, and snippets.

View araneta's full-sized avatar

araneta

View GitHub Profile
@araneta
araneta / middle-backend-programmer-test.md
Created March 8, 2024 03:42 — forked from RofieSagara/middle-backend-programmer-test.md
Middle Backend Programmer - Job Test

Task Description: Your task is to create a Golang backend service with HTTP routes for image processing. The service should provide the following functionalities:

  1. Convert image files from PNG to JPEG.
  2. Resize images according to specified dimensions.
  3. Compress images to reduce file size while maintaining reasonable quality.

Instructions:

  1. Create a Golang project with necessary dependencies to implement the image processing functionalities.
@araneta
araneta / Create C# Class from MySQL classes
Created October 7, 2017 07:55
This code create c# class of your Mysql table.
set @schema := 'schema_name';
set @table := 'table_name';
SET group_concat_max_len = 2048;
SELECT
concat('public class ', @table, '\n{\n', GROUP_CONCAT(a.property_ SEPARATOR '\n'), '\n}') class_
FROM
(select
CONCAT(
'\tpublic ',
case
@araneta
araneta / ProvinsiKota.php
Created February 23, 2017 03:27 — forked from achunk17/ProvinsiKota.php
Daftar Provinsi dan kota / kab. di Indonesia
<?php
/**
* @Nama : Daftar Provinsi di Indonesia beserta Kota/Kab.
* @Pembuat : Achunk JealousMan
* @Link : http://fb.me/achunks
* @Dibuat : 04 Juni 2014
* @Sumber : http://id.wikipedia.org
*/
@araneta
araneta / jwt
Created December 25, 2016 15:52
http://andreinc.net/2016/09/10/simple-authentication-with-spring-boot-and-jwt-tokens/
@araneta
araneta / main.cpp
Created November 30, 2015 06:55 — forked from nikotan/main.cpp
face detection sample code for OpenCV
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv/ml.h>
void doMosaic(IplImage* in, int x, int y,
int width, int height, int size);
int main (int argc, char **argv)
{
int i, c;
@araneta
araneta / gist:ba17bdc7d63c0b57c7bc
Created May 11, 2014 12:49
Joomla: get article id from joomla template index.php
$article_id  = JFactory::getApplication()->input->get('id');
@araneta
araneta / gist:95b51660dc8a07d1a797
Created May 11, 2014 12:46
Joomla: detect whether in front page
$uri = &JURI::getInstance();
$myabsoluteurl = $uri->toString(array('path'));   
if($myabsoluteurl==JURI::base(true).'/')
  $front_page = TRUE;
@araneta
araneta / gist:d7f20694025aa72ef798
Created May 11, 2014 12:44
Joomla: set page title:
$document = JFactory::getDocument();
$document->setTitle($this->escape($title));
@araneta
araneta / gist:ee3de8e23f6b59824e7f
Created May 11, 2014 12:42
Joomla: fix global $mainframe variable:
//old code
  global $mainframe;
  $params = &$mainframe->getParams();
//in joomla 1.7/2.5
  $app = &JFactory::getApplication();
  $params = $app->getParams();
@araneta
araneta / gist:53a7d3a2f89bebd34bff
Created May 11, 2014 12:41
Joomla: render module from template
jimport( 'joomla.application.module.helper' );
$module = JModuleHelper::getModule('mod_related_items');
$attribs['style'] = 'xhtml';
echo JModuleHelper::renderModule( $module, $attribs );